/* ==========================================================================
   SEGi Dental Society — Public Questionnaire & Survey Viewport
   Distraction-Free Respondent Experience (`css/survey.css`)
   ========================================================================== */

/* Page Background & Layout Structure */
.survey-public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark, #0b0f19);
  color: var(--text-main, #f8fafc);
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

html:has(body.light-theme),
body.light-theme,
body.light-theme.survey-public-page {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

body.light-theme.survey-public-page::before {
  display: none !important;
}

/* Minimalist Institutional Header */
.survey-public-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

body.light-theme .survey-public-header {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.survey-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.survey-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.survey-brand-text {
  display: flex;
  flex-direction: column;
}

.survey-brand-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main, #f8fafc);
  line-height: 1.1;
}

body.light-theme .survey-brand-title {
  color: var(--maroon-base, #8b0000);
}

.survey-brand-sub {
  font-size: 0.72rem;
  color: var(--gold-accent, #d49a37);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.survey-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #f8fafc);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

body.light-theme .theme-toggle-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold-accent, #d49a37);
}

/* Public Survey Main Container */
.survey-public-main {
  flex: 1;
  width: 100%;
  max-width: 740px;
  margin: 2rem auto 3.5rem auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Cards System */
.survey-card {
  background: var(--bg-surface, #131b2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 12px);
  padding: 1.75rem;
  position: relative;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .survey-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Header Card Accent */
.survey-header-card {
  border-top: 8px solid var(--maroon-base, #8b0000);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.survey-header-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main, #f8fafc);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.015em;
}

body.light-theme .survey-header-title {
  color: #0f172a;
}

.survey-header-desc {
  font-size: 0.95rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
  white-space: pre-wrap;
}

body.light-theme .survey-header-desc {
  color: #475569;
}

.survey-meta-pills {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.survey-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.02em;
}

.survey-pill-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.survey-pill-closed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.survey-pill-date {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Zero-PII PDPA Guarantee Banner */
.survey-pdpa-banner {
  background: rgba(139, 0, 0, 0.08);
  border: 1px solid rgba(139, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}

body.light-theme .survey-pdpa-banner {
  background: rgba(139, 0, 0, 0.05);
  border-color: rgba(139, 0, 0, 0.15);
  color: #64748b;
}

.survey-required-hint {
  font-size: 0.78rem;
  color: var(--maroon-bright, #e11d48);
  margin-top: 0.75rem;
  font-weight: 600;
}

/* Question Cards */
.survey-question-card {
  position: relative;
}

.survey-question-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 0 0 1rem 0;
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

body.light-theme .survey-question-title {
  color: #0f172a;
}

.survey-req-asterisk {
  color: var(--maroon-bright, #e11d48);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Interactive Input Controls */
.survey-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #f8fafc);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

body.light-theme .survey-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.survey-input:focus {
  border-color: var(--gold-accent, #d49a37);
  box-shadow: 0 0 0 3px rgba(212, 154, 55, 0.2);
}

.survey-textarea {
  min-height: 110px;
  resize: vertical;
}

/* Radio & Checkbox Groups */
.survey-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.survey-option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.95rem;
  color: var(--text-main, #f8fafc);
  user-select: none;
}

body.light-theme .survey-option-label {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

.survey-option-label:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle, rgba(255, 255, 255, 0.15));
}

body.light-theme .survey-option-label:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.survey-option-input {
  accent-color: var(--maroon-base, #8b0000);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Star Rating Control */
.survey-star-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
}

.survey-star-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0.2rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

body.light-theme .survey-star-btn {
  color: #cbd5e1;
}

.survey-star-btn:hover,
.survey-star-btn.is-active,
body.light-theme .survey-star-btn:hover,
body.light-theme .survey-star-btn.is-active {
  color: #f59e0b !important;
  transform: scale(1.18);
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
}

.survey-star-label-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f59e0b;
  margin-left: 0.5rem;
}

.survey-star-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.78rem;
  cursor: pointer;
  margin-left: 0.5rem;
  text-decoration: underline;
}

/* Error States & Shake Animation */
.survey-question-card.has-error {
  border-color: var(--maroon-bright, #e11d48) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25) !important;
  animation: shakeInvalid 0.35s ease-in-out;
}

@keyframes shakeInvalid {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.survey-field-error-msg {
  color: var(--maroon-bright, #e11d48);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.6rem;
  display: none;
}

.survey-question-card.has-error .survey-field-error-msg {
  display: block;
}

/* Submit Actions Strip */
.survey-actions-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  gap: 1rem;
}

.btn-survey-submit {
  background: linear-gradient(135deg, var(--maroon-base, #8b0000) 0%, #a81c2f 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.btn-survey-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 0, 0, 0.45);
  filter: brightness(1.1);
}

.btn-survey-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-survey-clear {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-survey-clear:hover {
  color: var(--text-main, #f8fafc);
  background: rgba(255, 255, 255, 0.05);
}

body.light-theme .btn-survey-clear:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

/* Success Completion Screen */
.survey-completion-card {
  text-align: center;
  padding: 3.5rem 2rem;
}

.survey-completion-icon {
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  animation: bounceSuccess 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceSuccess {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.survey-completion-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  margin: 0 0 0.75rem 0;
}

body.light-theme .survey-completion-title {
  color: #0f172a;
}

.survey-completion-sub {
  font-size: 1rem;
  color: var(--text-muted, #94a3b8);
  max-width: 520px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

body.light-theme .survey-completion-sub {
  color: #64748b;
}

.survey-completion-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Closed Survey State Card */
.survey-closed-card {
  text-align: center;
  padding: 3rem 2rem;
}

.survey-closed-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* General Feedback Hub (Multiple Active Surveys Selector) */
.survey-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.survey-hub-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

body.light-theme .survey-hub-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.survey-hub-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold-accent, #d49a37);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.survey-hub-btn {
  align-self: flex-start;
  background: var(--maroon-base, #8b0000);
  color: #ffffff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease;
}

.survey-hub-btn:hover {
  background: #a81c2f;
}

/* Loading State Spinner */
.survey-loading-card {
  text-align: center;
  padding: 4rem 2rem;
}

.survey-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(212, 154, 55, 0.2);
  border-top-color: var(--gold-accent, #d49a37);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Public Footer */
.survey-public-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

body.light-theme .survey-public-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

@media (max-width: 600px) {
  .survey-public-main {
    margin-top: 1rem;
    padding: 0 0.85rem;
  }
  .survey-card {
    padding: 1.25rem;
  }
  .survey-header-title {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   Preview Mode Yellow Alert Banner
   ========================================================================== */
.survey-preview-banner {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid #f59e0b;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-theme .survey-preview-banner {
  background: #fffbeb;
  color: #b45309;
}

/* ==========================================================================
   Sectioning & Multi-Step Wizard
   ========================================================================== */
.survey-section-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

body.light-theme .survey-section-indicator {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.survey-section-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-accent, #d49a37);
  background: rgba(212, 154, 55, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 154, 55, 0.3);
}

.survey-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

body.light-theme .survey-progress-track {
  background: #e2e8f0;
}

.survey-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--maroon-base, #8b0000), var(--gold-accent, #d49a37));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.survey-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-survey-back {
  background: transparent;
  color: var(--text-main, #f8fafc);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

body.light-theme .btn-survey-back {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}

.btn-survey-back:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold-accent, #d49a37);
}

/* ==========================================================================
   Range / Duration Wrappers (Date & Time)
   ========================================================================== */
.survey-range-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 540px) {
  .survey-range-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .survey-range-separator {
    text-align: center;
    padding: 0.2rem 0;
  }
}

.survey-range-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.survey-range-col-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-accent, #d49a37);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.survey-range-separator {
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ==========================================================================
   Custom Interactive Calendar Component
   ========================================================================== */
.custom-date-trigger {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  color: var(--text-main, #f8fafc);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

body.light-theme .custom-date-trigger {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.custom-date-trigger:hover,
.custom-date-trigger.is-open {
  border-color: var(--gold-accent, #d49a37);
  box-shadow: 0 0 0 3px rgba(212, 154, 55, 0.15);
}

.cal-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 100;
  width: 320px;
  max-width: 95vw;
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  animation: fadeInDown 0.2s ease;
}

body.light-theme .cal-popover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.cal-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  color: var(--text-main, #f8fafc);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  outline: none;
  cursor: pointer;
}

body.light-theme .cal-select {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.cal-nav-btn {
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-main, #f8fafc);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

body.light-theme .cal-nav-btn {
  border-color: #cbd5e1;
  color: #0f172a;
}

.cal-nav-btn:hover {
  background: rgba(212, 154, 55, 0.15);
  border-color: var(--gold-accent, #d49a37);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-accent, #d49a37);
  margin-bottom: 0.4rem;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-main, #f8fafc);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

body.light-theme .cal-day-cell {
  color: #0f172a;
}

.cal-day-cell:hover:not(.is-empty) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-accent, #d49a37);
}

body.light-theme .cal-day-cell:hover:not(.is-empty) {
  background: #f1f5f9;
}

.cal-day-cell.is-today {
  border-color: var(--gold-accent, #d49a37);
  font-weight: 700;
}

.cal-day-cell.is-selected {
  background: var(--maroon-base, #8b0000) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.4);
}

.cal-day-cell.is-empty {
  cursor: default;
  opacity: 0;
}

.cal-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

body.light-theme .cal-footer-bar {
  border-top-color: #e2e8f0;
}

.cal-quick-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-accent, #d49a37);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.cal-quick-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Custom Android-Style Digital Alarm Time Picker Widget
   ========================================================================== */
.digital-clock-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 1rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
}

body.light-theme .digital-clock-card {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.digital-clock-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.digital-digit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.digital-digit-input {
  width: 64px;
  height: 58px;
  background: var(--bg-card, #0f172a);
  border: 2px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-radius: 10px;
  color: var(--gold-accent, #d49a37);
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

body.light-theme .digital-digit-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--maroon-base, #8b0000);
}

.digital-digit-input:focus {
  border-color: var(--maroon-bright, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25);
}

.digital-digit-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.05em;
}

.digital-clock-colon {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-accent, #d49a37);
  margin-bottom: 1rem;
  animation: blinkColon 1.5s infinite;
}

@keyframes blinkColon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.digital-ampm-toggle {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

body.light-theme .digital-ampm-toggle {
  border-color: #cbd5e1;
}

.ampm-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ampm-btn.is-active {
  background: var(--maroon-base, #8b0000);
  color: #ffffff;
}

.digital-presets-strip {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.digital-preset-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.light-theme .digital-preset-chip {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

.digital-preset-chip:hover {
  border-color: var(--gold-accent, #d49a37);
  color: var(--gold-accent, #d49a37);
}

/* --------------------------------------------------------------------------
   Public Presentation Cards: Standalone Image & Video Cards
   -------------------------------------------------------------------------- */
.survey-image-card,
.survey-video-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.survey-media-caption {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 0;
}

body.light-theme .survey-media-caption {
  color: #0f172a;
}

.survey-image-display-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

body.light-theme .survey-image-display-wrap {
  background: #f8fafc;
}

.survey-image-display-wrap img {
  max-width: 100%;
  max-height: 480px;
  border-radius: 8px;
  object-fit: contain;
}

.survey-video-display-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
}

.survey-video-display-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Rich Text Formatting on Public Header & Descriptions */
.survey-header-desc a,
.survey-question-title a {
  color: var(--gold-accent, #d49a37);
  text-decoration: underline;
  word-break: break-all;
}

.survey-header-desc ul,
.survey-header-desc ol {
  margin: 0.5rem 0 0.5rem 0;
  padding-left: 1.65rem;
  padding-inline-start: 1.65rem;
  line-height: 1.6;
}

.survey-header-desc ul {
  list-style-type: disc;
}

.survey-header-desc ol {
  list-style-type: decimal;
}

.survey-header-desc li {
  margin-bottom: 0.25rem;
  padding-left: 0.25rem;
}

/* ==========================================================================
   TERMS & CONDITIONS DIALOGUE & SUBMISSION LOADING SCREEN
   ========================================================================== */
.survey-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: surveyFadeIn 0.2s ease-out forwards;
}

.survey-modal-card {
  background: var(--bg-card, #131722);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: surveyCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.light-theme .survey-modal-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

.survey-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.survey-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(212, 154, 55, 0.15);
  color: var(--gold-accent, #d49a37);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.survey-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main, #f1f5f9);
}

body.light-theme .survey-modal-title {
  color: #0f172a;
}

.survey-modal-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
}

.survey-terms-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 1.15rem;
  margin-bottom: 1.5rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-secondary, #cbd5e1);
}

body.light-theme .survey-terms-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.survey-terms-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

.survey-terms-list li {
  margin-bottom: 0.4rem;
}

.survey-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Fullscreen Submission Loading Overlay */
.survey-submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  pointer-events: all;
  user-select: none;
  animation: surveyFadeIn 0.2s ease-out forwards;
}

body.light-theme .survey-submit-overlay {
  background: rgba(255, 255, 255, 0.88);
}

.survey-loading-spinner-ring {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(212, 154, 55, 0.2);
  border-top-color: var(--gold-accent, #d49a37);
  border-right-color: var(--maroon-base, #8b0000);
  border-radius: 50%;
  animation: surveySpinRing 0.8s linear infinite;
  margin-bottom: 1.25rem;
}

.survey-loading-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main, #f1f5f9);
  margin-bottom: 0.5rem;
}

body.light-theme .survey-loading-title {
  color: #0f172a;
}

.survey-loading-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  max-width: 420px;
  line-height: 1.5;
}

@keyframes surveySpinRing {
  to { transform: rotate(360deg); }
}

@keyframes surveyCardPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes surveyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


