/* ============================================================
   STNC Campaign v4.0 — campaign.css (Modal Wizard Edition)
   2026 Kerala Election MCC
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Malayalam:wght@400;600;700;900&family=Noto+Sans+Malayalam:wght@400;600;700&display=swap');

/* ── Scoped box-sizing ───────────────────────────────────── */
#stnc-app *,
#stnc-app *::before,
#stnc-app *::after,
#stnc-modal *,
#stnc-modal *::before,
#stnc-modal *::after {
  box-sizing: border-box;
}

#stnc-app {
  font-family: "Noto Serif Malayalam", "Noto Sans Malayalam", Georgia, serif;
  color: #1a1a1a;
  line-height: 2;
  font-size: 1rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 60px;
}

/* ============================================================
   HERO
   ============================================================ */
.stnc-hero-inner {
  background: linear-gradient(145deg, #0a3d20 0%, #1b7040 60%, #0d5228 100%);
  border-radius: 20px;
  padding: 52px 36px 44px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stnc-hero-inner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}
.stnc-hero-inner::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.03);
  border-radius: 50%;
  pointer-events: none;
}
.stnc-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 30px;
  padding: 6px 20px;
  font-size: .82rem;
  margin-bottom: 20px;
  font-family: "Noto Sans Malayalam", sans-serif;
  letter-spacing: .5px;
  line-height: 1.5;
}
.stnc-hero-inner h1 {
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  font-weight: 900;
  line-height: 1.4;
  margin: 0 0 16px;
}
.stnc-hero-inner h1 span { color: #7edc9a; }
.stnc-hero-desc {
  font-size: 1.02rem;
  color: #c0f0d4;
  margin: 0 0 28px;
  line-height: 1.85;
}

/* Countdown */
.stnc-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.stnc-cd-unit {
  background: rgba(0,0,0,.3);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 64px;
  text-align: center;
}
.stnc-cd-unit span {
  font-size: 1.65rem;
  font-weight: 900;
  display: block;
  line-height: 1.1;
}
.stnc-cd-unit small {
  font-size: .67rem;
  color: #7edc9a;
  font-family: "Noto Sans Malayalam", sans-serif;
  display: block;
  margin-top: 4px;
  line-height: 1;
}
.stnc-cd-sep {
  font-size: 1.5rem;
  font-weight: 700;
  color: #7edc9a;
  align-self: flex-start;
  margin-top: 12px;
  line-height: 1;
}
.stnc-deadline {
  font-size: .86rem;
  color: #89d8aa;
  margin: 0 0 28px;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.7;
}

/* Hero CTA Button */
.stnc-btn-hero {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  border: none;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  max-width: 400px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.stnc-btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.4);
}
.stnc-btn-hero:active { transform: translateY(-1px); }

.stnc-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
  padding: 10px 26px;
  border-radius: 30px;
  font-size: .92rem;
  font-family: inherit;
  cursor: pointer;
  margin-top: 12px;
  line-height: 1.4;
  transition: background .15s;
}
.stnc-btn-outline:hover { background: rgba(255,255,255,.12); }

.stnc-steps-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.stnc-sp {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: #c0f0d4;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.4;
}
.stnc-sp span {
  background: #27ae60;
  color: #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.stnc-sp-arr { color: #7edc9a; font-size: 1rem; }
.stnc-expired-box {
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 16px;
  font-size: .9rem;
  line-height: 1.85;
}

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
#stnc-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  font-family: "Noto Serif Malayalam", "Noto Sans Malayalam", Georgia, serif;
  color: #1a1a1a;
  line-height: 2;
}
#stnc-modal.open { display: flex; flex-direction: column; }

/* Backdrop */
.stnc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 25, 12, .75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modal Container */
.stnc-modal-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 720px;
  margin: 0 auto;
  /* On desktop: center vertically with some breathing room */
  padding: 20px 16px;
  align-items: stretch;
  justify-content: center;
}
@media (min-width: 600px) {
  .stnc-modal-container {
    padding: 32px 24px;
    justify-content: center;
  }
}
@media (max-width: 599px) {
  .stnc-modal-container {
    padding: 0;
    justify-content: flex-end;
  }
}

/* Modal Panel */
.stnc-modal-panel {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  animation: npcSlideUp .3s cubic-bezier(.34,1.2,.64,1);
}
@media (max-width: 599px) {
  .stnc-modal-panel {
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    animation: npcSlideUpMobile .28s ease-out;
  }
}
@keyframes npcSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes npcSlideUpMobile {
  from { transform: translateY(60px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Modal Top Bar */
.stnc-modal-topbar {
  background: linear-gradient(135deg, #0a3d20, #1b7040);
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.stnc-modal-title {
  flex: 1;
  color: #fff;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.45;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-modal-title small {
  display: block;
  color: #a0d4b4;
  font-size: .75rem;
  font-weight: 400;
  margin-top: 2px;
}

/* Step Dots in topbar */
.stnc-step-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}
.stnc-step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  transition: background .3s, transform .3s;
}
.stnc-step-dot.done {
  background: #7edc9a;
}
.stnc-step-dot.active {
  background: #fff;
  transform: scale(1.35);
}

/* Close Button */
.stnc-modal-close {
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
  line-height: 1;
}
.stnc-modal-close:hover { background: rgba(255,255,255,.3); }

/* Modal Body (scrollable) */
.stnc-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Modal Steps */
.stnc-mstep { display: none; }
.stnc-mstep.active { display: block; }

/* ── Step Header inside modal ─────────────────────────────── */
.stnc-mstep-header {
  background: #f6fbf8;
  border-bottom: 1.5px solid #d4eddf;
  padding: 18px 24px 16px;
}
.stnc-mstep-header h2 {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #0a3d20;
  line-height: 1.45;
}
.stnc-mstep-header p {
  font-size: .87rem;
  color: #4a7a5c;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.7;
  margin: 0;
}
.stnc-step-badge {
  display: inline-block;
  background: #0a3d20;
  color: #7edc9a;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .73rem;
  margin-bottom: 10px;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: .3px;
}

/* ── Notice Box ──────────────────────────────────────────── */
.stnc-notice-box {
  background: #fffde7;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 20px 0;
  font-size: .88rem;
  line-height: 1.9;
}
.stnc-notice-box strong {
  display: block;
  margin-bottom: 10px;
  color: #e65100;
  font-size: .9rem;
  line-height: 1.5;
}
.stnc-notice-box ul {
  padding-left: 20px;
  margin: 0;
}
.stnc-notice-box li {
  margin-bottom: 7px;
  line-height: 1.85;
}
.stnc-notice-box li:last-child { margin-bottom: 0; }
.stnc-privacy {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 6px;
  padding: 9px 13px;
  margin-top: 12px;
  font-size: .81rem;
  color: #1b5e20;
  line-height: 1.8;
}

/* ── Letter Scroll ───────────────────────────────────────── */
.stnc-letter-scroll {
  background: #fafcfb;
  padding: 22px 24px;
}

/* ── Modal Footer ─────────────────────────────────────────── */
.stnc-modal-footer {
  padding: 16px 20px;
  background: #f8fcf9;
  border-top: 1.5px solid #e0f0e8;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================================
   LETTER CONTENT (shared)
   ============================================================ */
.stnc-letter-body {
  font-size: .95rem;
  line-height: 2.05;
  color: #1a1a1a;
}
.stnc-letter-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0 12px;
  border-bottom: 1.5px solid #b2dfca;
  margin-bottom: 18px;
  font-size: .81rem;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.5;
  gap: 10px;
  flex-wrap: wrap;
}
.stnc-meta-ref  { color: #a00; font-weight: 700; }
.stnc-meta-date { color: #0a3d20; font-weight: 600; }
.stnc-letter-heading {
  text-align: center;
  padding: 0 0 16px;
  border-bottom: 2px solid #e0f0e8;
  margin-bottom: 20px;
}
.stnc-letter-heading h3 {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0a3d20;
  margin: 0 0 7px;
  line-height: 1.5;
}
.stnc-letter-heading h4 {
  font-size: .93rem;
  font-weight: 600;
  color: #1a6535;
  line-height: 1.6;
  margin: 0;
}
.stnc-letter-to {
  background: #f6fbf8;
  border: 1.5px solid #b8dfc8;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: .89rem;
  line-height: 2;
}
.stnc-to-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0a3d20;
  margin-bottom: 8px;
  display: block;
  line-height: 1.4;
}
.stnc-letter-to p { margin: 0; line-height: 2; }
.stnc-letter-subject {
  background: #fff8e1;
  border-left: 4px solid #f0a500;
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: .89rem;
  line-height: 1.95;
}
.stnc-subject-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7a5500;
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
}
.stnc-salutation {
  font-size: .98rem;
  font-weight: 700;
  color: #0a3d20;
  margin: 14px 0 16px;
  line-height: 1.5;
}
.stnc-letter-body h4 {
  font-size: .97rem;
  font-weight: 700;
  color: #0a3d20;
  margin: 22px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid #b8dfc8;
  line-height: 1.5;
}
.stnc-letter-body h5 {
  font-size: .91rem;
  font-weight: 600;
  color: #1a6535;
  margin: 16px 0 8px;
  padding-left: 12px;
  border-left: 3px solid #4caf7d;
  line-height: 1.6;
}
.stnc-letter-body p { margin: 0 0 14px; }
.stnc-letter-body ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.stnc-letter-body ol li { margin-bottom: 10px; line-height: 2; }
.stnc-closing-para { margin-top: 20px; font-style: italic; }
.stnc-valediction {
  margin: 18px 0 14px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}
.stnc-sender-block { margin-top: 10px; }
.stnc-sig-table { border-collapse: collapse; width: 100%; font-size: .89rem; line-height: 2; }
.stnc-sig-table td { padding: 3px 10px 3px 0; vertical-align: top; }
.stnc-sl { color: #0a3d20; font-weight: 600; white-space: nowrap; }
.stnc-bl {
  display: inline-block;
  min-width: 160px;
  height: 1.3em;
  background: #e8f5e9;
  border-bottom: 1.5px solid #7ebd95;
  border-radius: 3px;
  vertical-align: bottom;
}
.stnc-bl-short { min-width: 80px; }
.stnc-bl-sign  { min-width: 120px; height: 2em; }
.stnc-bl-date  { min-width: 100px; }
.stnc-sig-row {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.stnc-sig-cell { font-size: .87rem; line-height: 1.8; }

/* ============================================================
   STEP 2 — FORM
   ============================================================ */
.stnc-card-body { padding: 20px 22px 10px; }

.stnc-field-group { margin-bottom: 16px; }
.stnc-label {
  display: block;
  font-size: .83rem;
  font-weight: 700;
  color: #0a3d20;
  margin-bottom: 6px;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.5;
}
.req { color: #c0392b; }
.stnc-input,
.stnc-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #c5ddd0;
  border-radius: 8px;
  font-size: .93rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  line-height: 1.5;
}
.stnc-input:focus,
.stnc-select:focus {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39,174,96,.12);
}
.stnc-input[readonly] {
  background: #f2f9f5;
  color: #3a6b4a;
  font-weight: 600;
}
.stnc-pin-row {
  display: flex;
  gap: 10px;
}
.stnc-pin-row .stnc-input { flex: 1; }
.stnc-btn-search {
  background: #0a3d20;
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: background .15s;
  line-height: 1.4;
  flex-shrink: 0;
}
.stnc-btn-search:hover { background: #1b7040; }
.stnc-btn-search:disabled { opacity: .6; cursor: not-allowed; }

.stnc-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) { .stnc-row2 { grid-template-columns: 1fr; } }

.stnc-err {
  display: block;
  color: #c0392b;
  font-size: .81rem;
  margin-top: 5px;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.6;
}

.stnc-divider {
  border: none;
  border-top: 1.5px solid #e0f0e8;
  margin: 20px 0;
}

.stnc-dist-count {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .84rem;
  color: #1b5e20;
  font-family: "Noto Sans Malayalam", sans-serif;
  margin-top: 10px;
  line-height: 1.75;
}

.stnc-addr-preview {
  background: #f6fbf8;
  border: 1px dashed #7ebd95;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .86rem;
  color: #0a3d20;
  margin-top: 4px;
  margin-bottom: 16px;
  line-height: 1.8;
  font-family: "Noto Sans Malayalam", sans-serif;
}

.stnc-declaration {
  background: #fafcff;
  border: 1.5px solid #c5d8f0;
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 6px;
}
.stnc-declaration h3 {
  font-size: .95rem;
  font-weight: 700;
  color: #0a3d20;
  margin: 0 0 14px;
  line-height: 1.5;
}
.stnc-declaration ol {
  padding-left: 20px;
  margin: 0 0 16px;
  font-size: .86rem;
  line-height: 2;
  color: #2a2a2a;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-declaration ol li { margin-bottom: 8px; }
.stnc-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: #0a3d20;
  cursor: pointer;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.75;
}
.stnc-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #27ae60;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: #27ae60;
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.stnc-btn-danger {
  background: #fff;
  color: #c0392b;
  border: 2px solid #e57373;
  padding: 11px 20px;
  border-radius: 30px;
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
  transition: background .15s;
}
.stnc-btn-danger:hover { background: #fdecea; }

.stnc-btn-success {
  background: linear-gradient(135deg, #27ae60, #1d9c52);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: .95rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 12px rgba(39,174,96,.3);
  line-height: 1.4;
}
.stnc-btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39,174,96,.35);
}
.stnc-btn-success:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stnc-btn-outline-sm {
  background: transparent;
  color: #0a3d20;
  border: 1.5px solid #7ebd95;
  padding: 11px 20px;
  border-radius: 30px;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
  transition: background .15s;
}
.stnc-btn-outline-sm:hover { background: #f2fbf6; }

/* ============================================================
   STEP 3 — SUCCESS
   ============================================================ */
.stnc-success-header {
  text-align: center;
  padding: 30px 24px 20px;
  background: linear-gradient(160deg, #f0fbf5 0%, #fff 60%);
  border-bottom: 1.5px solid #d4eddf;
}
.stnc-success-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
}
.stnc-success-header h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0a3d20;
  margin: 0 0 14px;
  line-height: 1.4;
}
.stnc-ref-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #0a3d20;
  color: #7edc9a;
  border-radius: 12px;
  padding: 10px 24px;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-ref-badge span { font-size: .73rem; opacity: .8; line-height: 1.4; }
.stnc-ref-badge strong { font-size: 1rem; letter-spacing: 1px; line-height: 1.5; }

/* Action Steps */
.stnc-action-step {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1.5px solid #e8f5e9;
  align-items: flex-start;
}
.stnc-action-step:last-of-type { border-bottom: none; }
.stnc-action-num {
  background: #0a3d20;
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.stnc-action-body { flex: 1; }
.stnc-action-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0a3d20;
  margin-bottom: 6px;
  line-height: 1.5;
}
.stnc-action-desc {
  font-size: .87rem;
  color: #3a5a46;
  font-family: "Noto Sans Malayalam", sans-serif;
  margin: 0 0 12px;
  line-height: 1.85;
}

.stnc-btn-pdf {
  background: #1565c0;
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: .92rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
  line-height: 1.4;
  display: inline-block;
}
.stnc-btn-pdf:hover { background: #1976d2; transform: translateY(-1px); }

.stnc-pdf-preview-link {
  display: block;
  margin-top: 7px;
  font-size: .78rem;
  color: #1565c0;
  text-decoration: underline;
  cursor: pointer;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-pdf-preview-link:hover { color: #1976d2; }

.stnc-btn-email {
  background: linear-gradient(135deg, #e65100, #f57c00);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: .92rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  line-height: 1.4;
  display: inline-block;
  text-decoration: none;
}
.stnc-btn-email:hover { opacity: .9; transform: translateY(-1px); }

.stnc-email-note {
  font-size: .78rem;
  color: #5a8a6a;
  margin: 8px 0 0;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.75;
}

/* Fallback Manual Box */
.stnc-fallback { margin-top: 14px; }
.stnc-btn-link {
  background: none;
  border: none;
  color: #1565c0;
  font-size: .83rem;
  font-family: "Noto Sans Malayalam", sans-serif;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  line-height: 1.7;
}
.stnc-manual-box {
  background: #f5f8ff;
  border: 1.5px solid #c5d5f0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 12px;
  font-size: .84rem;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-manual-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #d4e2f4;
}
.stnc-manual-row:last-child { border-bottom: none; }
.stnc-manual-body-row { grid-template-columns: 60px 1fr auto; align-items: start; }
.stnc-manual-row label { font-weight: 700; color: #0a3d20; font-size: .8rem; padding-top: 3px; }
.stnc-manual-val { color: #1a1a1a; word-break: break-all; line-height: 1.7; }
.stnc-body-text { white-space: pre-wrap; font-size: .78rem; color: #2a3a4a; }
.stnc-copy-mini {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: .73rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: sans-serif;
  font-weight: 600;
  transition: background .15s;
}
.stnc-copy-mini:hover { background: #c8e6c9; }
.stnc-copy-mini.copied { background: #27ae60; color: #fff; border-color: #27ae60; }

.stnc-success-note {
  background: linear-gradient(135deg, #e8f5e9, #f0fbf5);
  border-top: 1.5px solid #c8e6c9;
  padding: 16px 22px;
  text-align: center;
  font-size: .88rem;
  color: #1b5e20;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.85;
}
.stnc-success-done {
  text-align: center;
  padding: 16px 22px 24px;
}

/* ============================================================
   EXPIRED
   ============================================================ */
.stnc-expired-note {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: .88rem;
  font-family: "Noto Sans Malayalam", sans-serif;
  color: #e65100;
  line-height: 1.85;
  margin: 14px 22px;
}

/* ============================================================
   SCROLLBAR (modal body)
   ============================================================ */
.stnc-modal-body::-webkit-scrollbar { width: 5px; }
.stnc-modal-body::-webkit-scrollbar-track { background: #f0f4f2; }
.stnc-modal-body::-webkit-scrollbar-thumb { background: #7ebd95; border-radius: 10px; }

/* ============================================================
   ANONYMOUS BUTTON & MODE  (v5.1 additions)
   ============================================================ */
.stnc-anon-btn-wrap {
  margin-top: 12px;
  text-align: center;
}
#stnc-app .stnc-btn-anon,
#stnc-anon-btn {
  display: inline-block !important;
  width: auto !important;
  background: transparent !important;
  border: 1.5px dashed rgba(255,255,255,.6) !important;
  color: rgba(255,255,255,.9) !important;
  border-radius: 24px !important;
  padding: 8px 22px !important;
  font-size: .82rem !important;
  font-family: "Noto Sans Malayalam", sans-serif !important;
  cursor: pointer !important;
  transition: background .2s, border-color .2s !important;
  line-height: 1.7 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  outline: none !important;
  vertical-align: middle !important;
}
#stnc-app .stnc-btn-anon:hover,
#stnc-anon-btn:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.9) !important;
}

/* Anonymous mode notice bar */
.stnc-anon-notice {
  background: #e3f2fd;
  border-left: 4px solid #1565c0;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: .88rem;
  font-family: "Noto Sans Malayalam", sans-serif;
  color: #0d47a1;
  line-height: 1.85;
  margin: 0 22px 16px;
}

/* Reason textarea */
.stnc-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.75;
}
.stnc-field-hint {
  display: block;
  font-size: .78rem;
  color: #888;
  margin-top: 4px;
  font-family: "Noto Sans Malayalam", sans-serif;
}

/* ============================================================
   STNC additions — legal badges, privacy line, optional tag,
   coming-soon / countdown state, group-member box, lightbox,
   letter meta blocks (from / refs), small utilities
   ============================================================ */
.stnc-legal-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.stnc-legal-badges span {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .75rem;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.5;
}
.stnc-privacy-inline {
  font-size: .78rem; color: #6b6b6b;
  font-family: "Noto Sans Malayalam", sans-serif;
  margin: 0 0 14px; line-height: 1.5;
}
.stnc-optional {
  font-weight: 400; color: #999; font-size: .75rem; margin-left: 4px;
}
.stnc-mt12 { margin-top: 12px; }

/* ── Coming-soon / pre-launch state ─────────────────────── */
.stnc-comingsoon-box {
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 26px 22px;
  margin-top: 6px;
}
.stnc-cs-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .8rem;
  font-family: "Noto Sans Malayalam", sans-serif;
  margin-bottom: 12px;
}
.stnc-cs-text {
  font-size: .98rem;
  color: #eafff0;
  margin: 0 0 16px;
  font-family: "Noto Sans Malayalam", sans-serif;
  line-height: 1.7;
}
.stnc-cs-stay {
  font-size: .88rem;
  color: #b8f5d0;
  margin: 16px 0 12px;
  font-family: "Noto Sans Malayalam", sans-serif;
}

/* ── Group-member instructions box ──────────────────────── */
.stnc-group-box {
  background: #fff7e6;
  border: 1.5px dashed #e0a838;
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 8px;
}
.stnc-group-title {
  font-weight: 700;
  font-size: .98rem;
  color: #7a4a00;
  margin-bottom: 10px;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-group-steps {
  margin: 0; padding-left: 22px; color: #4a3200;
  font-size: .9rem; line-height: 1.8;
}
.stnc-group-steps li { margin-bottom: 6px; }
.stnc-group-steps code {
  background: #fff0cc; padding: 1px 6px; border-radius: 4px; font-size: .85em;
}
.stnc-group-steps a { color: #0a6b3d; font-weight: 700; }

/* ── Letter: from block + refs list (mirrors letter-to) ──── */
.stnc-letter-from { margin: 14px 0 18px; }
.stnc-letter-refs { margin: 0 0 18px; }
.stnc-letter-refs ol { margin: 6px 0 0; padding-left: 20px; font-size: .92rem; line-height: 1.9; }

/* ── Lightbox (read-only draft preview before launch) ────── */
.stnc-lightbox { position: fixed; inset: 0; z-index: 9999; display: none; }
.stnc-lightbox.open { display: block; }
.stnc-lightbox-backdrop {
  position: absolute; inset: 0; background: rgba(10,20,15,.72); backdrop-filter: blur(2px);
}
.stnc-lightbox-panel {
  position: relative;
  max-width: 720px;
  margin: 4vh auto;
  max-height: 92vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.stnc-lightbox-panel .stnc-modal-body { overflow-y: auto; }

/* ── Letter scroll container (used in preview + lightbox) ─ */
.stnc-letter-scroll {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 18px 20px;
  background: #fcfcfa;
}

/* ── Audio narration player + more-info link (hero) ──────── */
.stnc-audio-block {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  text-align: center;
}
.stnc-audio-label {
  font-size: .88rem;
  color: #eafff0;
  margin-bottom: 8px;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-audio-player {
  width: 100%;
  max-width: 420px;
  height: 38px;
  border-radius: 20px;
}
.stnc-more-info {
  font-size: .82rem;
  color: #d7f5e2;
  margin: 0 0 18px;
  font-family: "Noto Sans Malayalam", sans-serif;
}
.stnc-more-info a {
  color: #ffe17a;
  font-weight: 700;
  text-decoration: underline;
}
