/* Phone view: where attendees land after scanning the QR code. */

body.ask {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.hero {
  position: relative;
  color: var(--white);
  padding: max(28px, env(safe-area-inset-top)) 20px 64px;
}

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-bottom: 28px;
}

.hero__logo {
  height: 32px;
  width: auto;
}


.hero__kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0 0 8px;
  font-size: clamp(30px, 9vw, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.hero__lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  opacity: 0.92;
  max-width: 32ch;
}

.hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 44px;
  fill: var(--bg);
}

.panel {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px max(32px, env(safe-area-inset-bottom));
}

.view {
  animation: rise 0.5s var(--ease) both;
}

.view[hidden] {
  display: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.field {
  position: relative;
}

textarea {
  display: block;
  width: 100%;
  min-height: 168px;
  padding: 16px 16px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  resize: vertical;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea::placeholder {
  color: #8c8c8c;
}

textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 30, 53, 0.15), var(--shadow);
}

.field__count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.field__count.is-near {
  color: var(--red);
  font-weight: 600;
}

.error {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--pink);
  color: var(--red-dark);
  font-size: 15px;
}

.btn--block {
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  font-size: 17px;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 20px 4px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.note svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  fill: currentColor;
}

.view--done,
.view--closed {
  text-align: center;
  padding: 24px 8px;
}

.view--done h2,
.view--closed h2 {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 26px;
}

.view--done p,
.view--closed p {
  margin: 0 auto 28px;
  max-width: 30ch;
  font-size: 17px;
  line-height: 1.5;
}

.check svg {
  width: 84px;
  height: 84px;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check circle {
  stroke: var(--red);
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.6s var(--ease) forwards;
}

.check path {
  stroke: var(--red);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.4s 0.45s var(--ease) forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* Sent question flying up towards the big screen */
.flyer {
  position: fixed;
  z-index: 50;
  max-height: 168px;
  overflow: hidden;
  padding: 16px;
  border-radius: 18px 18px 18px 4px;
  background: var(--white);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  box-shadow: 0 16px 40px rgba(60, 0, 10, 0.25);
  white-space: pre-line;
  overflow-wrap: anywhere;
  pointer-events: none;
  animation: fly 0.9s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

@keyframes fly {
  0% { transform: none; opacity: 1; }
  20% { transform: translateY(12px) scale(0.96); opacity: 1; }
  100% { transform: translateY(-110vh) scale(0.5) rotate(-6deg); opacity: 0; }
}

textarea.is-sent {
  color: transparent;
}

textarea.is-sent::placeholder {
  color: transparent;
}
