/* =========================================================
 * Exhibition consent and visitor feedback UI
 * Private capability styles are kept outside the public static root.
 * ========================================================= */

.google-signin-unavailable {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #4e5968;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.insights-modal-dim {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 0 0;
  background: rgba(8, 15, 29, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: insights-fade-in .18s ease-out;
}

.insights-dialog {
  width: min(100%, 640px);
  max-height: min(88dvh, 780px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  color: #191f28;
  box-shadow: 0 -20px 70px rgba(8, 15, 29, .26);
  animation: insights-sheet-up .24s cubic-bezier(.2, .72, .2, 1);
  outline: none;
}

.insights-dialog:focus-visible {
  box-shadow: 0 0 0 3px rgba(49, 130, 246, .45), 0 -20px 70px rgba(8, 15, 29, .26);
}

.insights-consent-dialog { max-width: 560px; }

.insights-kicker {
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.insights-dialog h2 {
  margin: 0;
  color: #172033;
  letter-spacing: -.025em;
}

.insights-dialog h2 { font-size: clamp(25px, 7vw, 34px); line-height: 1.12; }

.insights-dialog-copy,
#insights-consent-copy {
  margin: 12px 0 18px;
  color: #4e5968;
  font-size: 15px;
  line-height: 1.62;
}

.insights-privacy-details {
  margin: 4px 0 22px;
  padding: 12px 14px;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  background: #f8fafc;
  color: #4e5968;
  font-size: 13px;
}

.insights-privacy-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #263244;
  font-weight: 800;
  cursor: pointer;
}

.insights-privacy-details p { margin: 6px 0 2px; line-height: 1.58; }

.insights-consent-actions,
.insights-form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.insights-btn {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 11px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

.insights-btn-primary { color: #fff; background: #2563eb; }
.insights-btn-primary:hover { background: #1d4ed8; }
.insights-btn-secondary { color: #263244; background: #fff; border-color: #d8e0e9; }
.insights-btn-secondary:hover { background: #f8fafc; border-color: #bac6d4; }
.insights-btn:active { transform: scale(.985); }
.insights-btn:disabled { opacity: .55; cursor: wait; transform: none; }

.insights-btn:focus-visible,
.insights-icon-btn:focus-visible,
.insights-kind-tab:focus-visible,
.insights-choice input:focus-visible + span,
.insights-feedback-launcher:focus-visible,
.insights-end-demo:focus-visible,
.insights-contact-choice input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .42);
  outline-offset: 2px;
}

.insights-fineprint {
  margin: 14px 0 0;
  color: #6b7684;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.insights-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.insights-icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid #e0e6ed;
  border-radius: 50%;
  background: #f8fafc;
  color: #526071;
  font: 400 28px/1 system-ui, sans-serif;
  cursor: pointer;
}

.insights-kind-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 14px;
  background: #eef2f7;
}

.insights-kind-tab {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #667386;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.insights-kind-tab.is-active {
  background: #fff;
  color: #172033;
  box-shadow: 0 2px 8px rgba(23, 32, 51, .08);
}

.insights-choice-fieldset {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.insights-field-label {
  display: block;
  margin-bottom: 9px;
  color: #263244;
  font-size: 13px;
  font-weight: 850;
}

.insights-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.insights-choice { min-width: 0; cursor: pointer; }
.insights-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.insights-choice span {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #fff;
  color: #526071;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
}

.insights-choice input:checked + span {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.insights-field-group { margin-bottom: 17px; }
.insights-field-group textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid #d8e0e9;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.insights-field-group textarea:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, .15);
}

.insights-character-count { margin-top: 5px; color: #8b95a1; font-size: 11px; text-align: right; }

.insights-contact-choice {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 13px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.insights-contact-choice input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; accent-color: #2563eb; }
.insights-contact-choice span { display: block; }
.insights-contact-choice strong { display: block; font-size: 12px; }
.insights-contact-choice small { display: block; margin-top: 3px; color: #6b7684; font-size: 11px; line-height: 1.45; }

.insights-presenter-note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 13px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
}

.insights-presenter-note span { color: #3b5b91; line-height: 1.45; }

.insights-form-status {
  min-height: 22px;
  margin-bottom: 8px;
  color: #596779;
  font-size: 12px;
  font-weight: 700;
}

.insights-form-status.is-error { color: #b42318; }
.insights-form-status.is-success { color: #087a4b; }

.insights-feedback-launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 88;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 0 17px;
  background: #172033;
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.insights-feedback-launcher[hidden] { display: none !important; }
.insights-feedback-dot { width: 9px; height: 9px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 4px rgba(96, 165, 250, .18); }
body[data-step="quote"] .insights-feedback-launcher { bottom: calc(92px + env(safe-area-inset-bottom)); }

.insights-end-demo {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 88;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #4e5968;
  box-shadow: 0 9px 24px rgba(15, 23, 42, .14);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.insights-end-demo[hidden] { display: none !important; }
.insights-end-demo:disabled { cursor: wait; opacity: .7; }
body[data-step="quote"] .insights-end-demo { bottom: calc(92px + env(safe-area-inset-bottom)); }


@media (max-width: 767px) {
  /* Keep the inline preview CTA clear of the fixed feedback and end controls. */
  body[data-step="studio"] #cta-bar.preview-inline-cta {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 560px) {
  .insights-consent-actions,
  .insights-form-actions { grid-template-columns: 1fr 1fr; }
  .insights-consent-actions .insights-btn-primary { order: 2; }
  .insights-consent-actions .insights-btn-secondary { order: 1; }
  .insights-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 700px) {
  .insights-modal-dim {
    align-items: center;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }
  .insights-dialog {
    border-radius: 26px;
    padding: 30px;
    box-shadow: 0 28px 90px rgba(8, 15, 29, .34);
    animation: insights-dialog-in .2s ease-out;
  }
  .insights-choice-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .insights-feedback-dialog .insights-choice-fieldset:nth-of-type(2) .insights-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .insights-modal-dim { align-items: stretch; padding-top: max(8px, env(safe-area-inset-top)); }
  .insights-dialog { max-height: calc(100dvh - max(8px, env(safe-area-inset-top))); border-radius: 20px 20px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .insights-modal-dim,
  .insights-dialog { animation: none; }
  .insights-btn { transition: none; }
}

@keyframes insights-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes insights-sheet-up { from { transform: translateY(28px); opacity: .45; } to { transform: none; opacity: 1; } }
@keyframes insights-dialog-in { from { transform: translateY(12px) scale(.985); opacity: .45; } to { transform: none; opacity: 1; } }
