/* ==========================================================================
   Ask ATK (Figma 72:17415). Header 223px incl. status bar, form, bottom bar.
   ========================================================================== */
.screen-ask-atk { background: var(--bg); }

/* ---------- Wine header (Ask ATK Sticky Header 72:18308) ---------- */
.ask-header {
  position: relative; flex-shrink: 0; z-index: 2;
  background: var(--wine); color: #fff;
  padding: calc(var(--safe-top) + 8px) 16px 16px;
  display: flex; flex-direction: column; align-items: center;
}
.ask-close { position: absolute; left: 16px; top: calc(var(--safe-top) + 8px); width: 40px; height: 40px; }
.ask-close img { width: 40px; height: 40px; }
.ask-close:active { opacity: .6; }
.ask-title { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; }
.ask-title h1 { color: #fff; white-space: nowrap; }
.ask-badge { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.ask-badge img { position: absolute; left: 7.25px; top: 7.25px; width: 25.5px; height: 25.5px; }
.ask-badge b {
  position: absolute; left: calc(50% - .5px); top: calc(50% - 10px); transform: translateX(-50%);
  font: 600 14px/22.75px var(--font-sans); color: #fff;
}
.ask-intro { width: 304px; max-width: 100%; margin-top: 8px; margin-left: 1px; text-align: center; color: var(--neutral-light); }
.ask-avatars { display: flex; justify-content: center; margin-top: 16.8px; }
.ask-avatar {
  position: relative; width: 41px; height: 41px; flex-shrink: 0;
  border: 2px solid var(--wine); border-radius: 240px; overflow: hidden; background: #fff;
}
.ask-avatar + .ask-avatar { margin-left: -8px; }
.ask-avatar img {
  position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
  width: 45px; height: 41px; object-fit: contain;
}

/* ---------- Offline banner (72:17686) ---------- */
.ask-offline {
  flex-shrink: 0; background: #fea591; padding: 16px;
  display: flex; align-items: center; gap: 16px;
}
.ask-offline[hidden] { display: none; }
.ask-offline img { width: 32px; height: 32px; flex-shrink: 0; }
.ask-offline p { flex: 1 1 auto; max-width: 310px; font: 500 14px/19.6px var(--font-sans); color: var(--caviar); }

/* ---------- Form ---------- */
.ask-form { padding: 32px 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.ask-field { display: flex; flex-direction: column; }
.ask-label { font: 700 16px/26px var(--font-sans); color: var(--caviar); }
.ask-input {
  display: block; width: 100%; height: 40px; margin: 0;
  background: #fff; border: 1.5px solid var(--neutral-light-shade); border-radius: 6px;
  padding: 0 14.5px;
  font: 400 16px/26px var(--font-sans); color: var(--caviar);
  outline: none; -webkit-appearance: none; appearance: none; box-shadow: none;
  transition: border-color .15s ease;
}
.ask-input:focus { border-color: var(--caviar); }
.ask-textarea { height: 175px; padding: 10.5px 14.5px; resize: none; overflow-y: auto; scrollbar-width: none; }
.ask-textarea::-webkit-scrollbar { display: none; }
.ask-form.locked .ask-input { color: var(--neutral-dark); }

.ask-drop {
  width: 100%; height: 64px;
  background: var(--neutral-light); border: 1px dashed var(--neutral-light-shade); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding-left: 1px;
  font: 400 14px/22.75px var(--font-sans); color: var(--neutral-dark);
  transition: background .15s ease;
}
.ask-drop:active { background: var(--neutral-light-shade); }
.ask-drop img { width: 16px; height: 16px; }

.ask-files { list-style: none; margin: 0; padding: 0; }
.ask-files:not(:empty) { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ask-file-row {
  display: flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 0 4px 0 14.5px;
  border: 1.5px solid var(--neutral-light-shade); border-radius: 6px;
}
.ask-file-row > img { width: 16px; height: 16px; flex-shrink: 0; }
.ask-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 14px/22.75px var(--font-sans); color: var(--caviar); }
.ask-file-size { flex-shrink: 0; font: 400 14px/22.75px var(--font-sans); color: var(--neutral-dark); }
.ask-file-remove { width: 28px; height: 28px; flex-shrink: 0; }
.ask-file-remove img { width: 28px; height: 28px; filter: invert(1) brightness(.17); }

/* ---------- Bottom bar ---------- */
.ask-bar {
  flex-shrink: 0; background: var(--bg);
  padding: 16px 16px calc(var(--safe-bottom) + 4px);
  display: flex; align-items: center; flex-wrap: wrap;
}
/* Shown above the buttons when Send is tapped with fields missing (Send itself never disables). */
.ask-error {
  flex: 0 0 100%; margin: -4px 0 12px; text-align: center;
  font: 600 14px/19.6px var(--font-sans); color: var(--tomato);
  animation: ask-fade .25s var(--ease-out);
}
.ask-input.invalid, .ask-input.invalid:focus { border-color: var(--tomato); }
.ask-cancel {
  flex: 0 0 103px; height: 48px; padding-left: 20px; text-align: left;
  font: 400 18px/29.25px var(--font-sans); color: var(--caviar);
}
.ask-cancel:active { opacity: .6; }
.ask-send, .ask-close-btn {
  flex: 1 1 auto; height: 48px; border-radius: 30px;
  background: var(--caviar); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 40px;
  font: 700 18px/25.2px var(--font-sans); white-space: nowrap;
  transition: opacity .2s ease, transform .1s ease;
}
.ask-send:active, .ask-close-btn:active { transform: scale(.98); }
.ask-send-icon { width: 24px; height: 24px; }
.ask-spinner { display: none; width: 20px; height: 20px; }
.ask-send.sending { cursor: default; }
.ask-send.sending .ask-send-icon { display: none; }
.ask-send.sending .ask-spinner { display: block; animation: ask-spin .8s linear infinite; }
@keyframes ask-spin { to { transform: rotate(360deg); } }

/* ---------- Confirmed (72:17488) ---------- */
.ask-done {
  display: flex; flex-direction: column; align-items: center;
  padding: 89px 16px 24px;
  animation: ask-fade .35s var(--ease-out);
}
.ask-done img { width: 88px; height: 88px; margin-left: 1px; }
.ask-done p { width: 281px; max-width: 100%; margin-top: 24px; text-align: center; font: 400 18px/29.25px var(--font-sans); color: var(--caviar); }
@keyframes ask-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- iOS alert (72:17623) ---------- */
.ask-alert-root {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.ask-alert-root.show { opacity: 1; }
.ask-alert {
  width: 270px; border-radius: 14px; overflow: hidden;
  background: rgba(242,242,242,.85); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  text-align: center; transform: scale(1.1); transition: transform .2s ease;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif; color: #000;
}
.ask-alert-root.show .ask-alert { transform: scale(1); }
.ask-alert-body { padding: 19px 16px 20px; }
.ask-alert h2 { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.4px; }
.ask-alert p { margin-top: 2px; font-size: 13px; line-height: 18px; letter-spacing: -.1px; }
.ask-alert button {
  display: block; width: 100%; height: 44px; border-top: .5px solid rgba(60,60,67,.36);
  font-size: 17px; line-height: 22px; color: #007aff; font-family: inherit;
}
.ask-alert button:active { background: rgba(0,0,0,.06); }
