/* ═══════════════════════════════════════════════════════════════
   STORM WIDGETS — Ahmedabad Podcast brand
   Extracted from the legacy "Dream Clarity" webstyle.css (which is a
   different project's full theme and must not be loaded site-wide —
   it overrides h1-h6 color, .btn-primary, pagination, etc. globally).
   Only the .sw-* widget rules are needed here, re-mapped from the old
   Dream Clarity navy/gold palette to the current Ahmedabad Podcast
   brand tokens (--ink / --paper / --orange defined in theme.css).
   Covers: top-bar · modal · trust toast · cookie · whatsapp
           chat-fab · chat-window
═══════════════════════════════════════════════════════════════ */

:root {
  --sw-bg-primary:   var(--ink, #181815);
  --sw-bg-secondary: #2b2a25;
  --sw-accent:       var(--orange, #EF5B2A);
  --sw-accent-deep:  #D8501F;
  --sw-text-light:   #F9F9F9;
  --sw-text-dark:    #181815;
  --sw-font-body:    'Inter', system-ui, sans-serif;
  --sw-font-heading: 'Playfair Display', Georgia, serif;
  --sw-radius:       10px;
  --sw-radius-lg:    16px;
  --sw-ease:         .2s ease;
}

/* ── Shared base reset ──────────────────────────────────────── */
.sw-widget {
  font-family: var(--sw-font-body);
  box-sizing: border-box;
  line-height: 1.5;
}
.sw-widget *,
.sw-widget *::before,
.sw-widget *::after { box-sizing: border-box; }


/* ─────────────────────────────────────────────────────────────
   1. TOP NOTIFICATION BAR
───────────────────────────────────────────────────────────── */
.sw-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Urgent — orange gradient bar (event / deadline feel) */
.sw-top-bar.sw-style-urgent {
  background: linear-gradient(90deg, var(--sw-accent), var(--sw-accent-deep));
  color: var(--sw-text-light);
}
.sw-top-bar.sw-style-urgent .sw-top-cta {
  background: var(--sw-bg-primary);
  color: var(--sw-accent);
  padding: 4px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: opacity var(--sw-ease);
}
.sw-top-bar.sw-style-urgent .sw-top-cta:hover { opacity: .8; }
.sw-top-bar.sw-style-urgent .sw-close        { color: var(--sw-text-light); }

/* Professional — ink bar (calm authority) */
.sw-top-bar.sw-style-professional {
  background: var(--sw-bg-primary);
  color: var(--sw-text-light);
  border-bottom: 1px solid rgba(239,91,42,0.25);
}
.sw-top-bar.sw-style-professional .sw-top-cta {
  background: var(--sw-accent);
  color: var(--sw-text-light);
  padding: 4px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: background var(--sw-ease);
}
.sw-top-bar.sw-style-professional .sw-top-cta:hover { background: var(--sw-accent-deep); }

/* Close × — both styles */
.sw-top-bar .sw-close {
  margin-left: auto;
  cursor: pointer;
  font-size: 18px;
  opacity: .65;
  transition: opacity var(--sw-ease);
  line-height: 1;
  padding: 0 4px;
  user-select: none;
}
.sw-top-bar .sw-close:hover { opacity: 1; }


/* ─────────────────────────────────────────────────────────────
   2. MODAL (on-load & exit-intent)
───────────────────────────────────────────────────────────── */
.sw-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(24,24,21,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: swFadeIn .25s ease;
}

.sw-modal-card,
.popup-box {
  background: var(--sw-bg-primary);
  border: 1px solid rgba(239,91,42,0.25);
  border-radius: var(--sw-radius-lg);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: swSlideUp .3s ease;
  position: relative;
}

.sw-modal-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.sw-modal-content {
  padding: 32px 36px 36px;
}

.sw-modal-content h3 {
  font-family: var(--sw-font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--sw-text-light);
  margin: 0 0 12px;
  line-height: 1.3;
}

.sw-modal-content p {
  font-size: 15px;
  color: rgba(249,249,249,0.72);
  margin: 0 0 24px;
  line-height: 1.7;
}

/* Primary CTA (registration button) */
.sw-modal-content button:not(.closebtn) {
  display: inline-block;
  background: linear-gradient(90deg, var(--sw-accent), var(--sw-accent-deep));
  color: var(--sw-text-light);
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-family: var(--sw-font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow var(--sw-ease), transform var(--sw-ease);
}
.sw-modal-content button:not(.closebtn):hover {
  box-shadow: 0 0 18px 4px rgba(239,91,42,0.35);
  transform: translateY(-1px);
}

/* Close × button */
.sw-modal-content .closebtn,
.sw-modal-card .closebtn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255,255,255,0.08);
  color: var(--sw-text-light);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--sw-ease);
  line-height: 1;
}
.sw-modal-content .closebtn:hover,
.sw-modal-card .closebtn:hover { background: rgba(255,255,255,0.16); }


/* ─────────────────────────────────────────────────────────────
   3. TRUST / SOCIAL PROOF TOAST
   Classes: .sw-trust-card  +  .sw-trust-visible (added by JS)
───────────────────────────────────────────────────────────── */
.sw-trust-card {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  background: var(--sw-bg-primary);
  border: 1px solid rgba(239,91,42,0.3);
  border-left: 3px solid var(--sw-accent);
  border-radius: var(--sw-radius);
  padding: 14px 18px;
  max-width: 280px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);

  /* Hidden by default — JS adds .sw-trust-visible */
  opacity: 0;
  transform: translateX(-16px);
  pointer-events: none;
  transition: opacity .4s var(--sw-ease), transform .4s var(--sw-ease);
}

.sw-trust-card.sw-trust-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.sw-trust-card b:first-child {
  display: block;
  font-family: var(--sw-font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sw-accent);
  margin-bottom: 2px;
}

.sw-trust-card div {
  font-size: 12.5px;
  color: rgba(249,249,249,0.72);
  line-height: 1.45;
}

.sw-trust-card b {
  color: var(--sw-text-light);
  font-weight: 600;
}

/* Tiny pulse badge on the left border */
.sw-trust-card::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -7px;
  width: 10px;
  height: 10px;
  background: var(--sw-accent);
  border-radius: 50%;
  border: 2px solid var(--sw-bg-primary);
  animation: swPulse 2s infinite;
}

@keyframes swPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,91,42,0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(239,91,42,0); }
}


/* ─────────────────────────────────────────────────────────────
   4. COOKIE CONSENT BANNER
   Classes: .sw-cookie-banner  +  .sw-pos-bottom-left / right
───────────────────────────────────────────────────────────── */
.sw-cookie-banner {
  position: fixed;
  z-index: 9997;
  background: var(--sw-bg-primary);
  border: 1px solid rgba(239,91,42,0.25);
  border-radius: var(--sw-radius);
  padding: 18px 22px;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: swSlideUp .3s ease;
}

.sw-cookie-banner.sw-pos-bottom-left  { bottom: 24px; left:  24px; }
.sw-cookie-banner.sw-pos-bottom-right { bottom: 24px; right: 24px; }
.sw-cookie-banner.sw-pos-bottom       { bottom: 0; left: 0; right: 0; max-width: 100%; border-radius: var(--sw-radius) var(--sw-radius) 0 0; }

.sw-cookie-banner p {
  margin: 0;
  font-size: 13px;
  color: rgba(249,249,249,0.8);
  line-height: 1.6;
}

.sw-cookie-banner p a {
  color: var(--sw-accent);
  text-decoration: none;
  font-weight: 600;
}
.sw-cookie-banner p a:hover { text-decoration: underline; }

.sw-cookie-banner button {
  align-self: flex-start;
  background: linear-gradient(90deg, var(--sw-accent), var(--sw-accent-deep));
  color: var(--sw-text-light);
  border: none;
  border-radius: 50px;
  padding: 9px 22px;
  font-family: var(--sw-font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: box-shadow var(--sw-ease), transform var(--sw-ease);
}
.sw-cookie-banner button:hover {
  box-shadow: 0 0 14px 3px rgba(239,91,42,0.3);
  transform: translateY(-1px);
}


/* ─────────────────────────────────────────────────────────────
   5. WHATSAPP FLOATING BUTTON
   Classes: .sw-wa-fab  +  .sw-pos-right / .sw-pos-left
   (kept WhatsApp's own official green — that's their brand mark,
   not ours, and visitors expect that color to recognize it)
───────────────────────────────────────────────────────────── */
.sw-wa-fab {
  position: fixed;
  bottom: 28px;
  z-index: 9996;
  width: 54px;
  height: 54px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 18px rgba(37,211,102,0.45);
  text-decoration: none;
  transition: transform var(--sw-ease), box-shadow var(--sw-ease);
}
.sw-wa-fab.sw-pos-right { right: 28px; }
.sw-wa-fab.sw-pos-left  { left:  28px; }
.sw-wa-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37,211,102,0.6);
}
/* Ripple ring */
.sw-wa-fab::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.4);
  animation: swPulse2 2.5s infinite;
}
@keyframes swPulse2 {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(37,211,102,0); }
}


/* ─────────────────────────────────────────────────────────────
   6. CHAT — FAB BUTTON
───────────────────────────────────────────────────────────── */
.sw-chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9996;
  width: 54px;
  height: 54px;
  background: var(--sw-bg-secondary);
  border: 2px solid rgba(239,91,42,0.35);
  color: var(--sw-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform var(--sw-ease), box-shadow var(--sw-ease), border-color var(--sw-ease);
  user-select: none;
}
.sw-chat-fab:hover {
  transform: scale(1.08);
  border-color: var(--sw-accent);
  box-shadow: 0 6px 22px rgba(239,91,42,0.3);
}
/* Push WhatsApp up if both are visible */
.sw-wa-fab.sw-pos-right ~ .sw-chat-fab,
body:has(.sw-wa-fab.sw-pos-right) .sw-chat-fab {
  bottom: 92px;
}


/* ─────────────────────────────────────────────────────────────
   7. CHAT — WINDOW
───────────────────────────────────────────────────────────── */
.sw-chat-window {
  position: fixed;
  bottom: 92px;
  right: 28px;
  z-index: 9995;
  width: 320px;
  background: var(--sw-bg-primary);
  border: 1px solid rgba(239,91,42,0.2);
  border-radius: var(--sw-radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: swSlideUp .25s ease;
}
.sw-chat-window.sw-hidden { display: none; }

/* Header strip */
.sw-chat-header {
  background: linear-gradient(90deg, var(--sw-accent), var(--sw-accent-deep));
  color: var(--sw-text-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.sw-chat-header span {
  font-family: var(--sw-font-heading);
  font-size: 15px;
  font-weight: 700;
}
.sw-chat-header button {
  background: rgba(0,0,0,0.18);
  border: none;
  color: var(--sw-text-light);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--sw-ease);
}
.sw-chat-header button:hover { background: rgba(0,0,0,0.3); }

/* Body */
.sw-chat-body { padding: 20px; }

.sw-chat-msg {
  font-size: 13.5px;
  color: rgba(249,249,249,0.72);
  margin: 0 0 16px;
  line-height: 1.6;
}

/* Form inputs */
.sw-chat-body form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sw-chat-body input,
.sw-chat-body textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--sw-text-light);
  font-family: var(--sw-font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--sw-ease);
  resize: none;
}
.sw-chat-body input::placeholder,
.sw-chat-body textarea::placeholder { color: rgba(249,249,249,0.35); }
.sw-chat-mathlabel {
  color: var(--sw-text-light);
  font-size: 12.5px;
  font-family: var(--sw-font-body);
  margin-bottom: -4px;
}
.sw-chat-body input:focus,
.sw-chat-body textarea:focus {
  border-color: var(--sw-accent);
  box-shadow: 0 0 0 3px rgba(239,91,42,0.15);
}
.sw-chat-body textarea { min-height: 72px; }

/* Send button */
.sw-chat-body button[type="submit"] {
  background: linear-gradient(90deg, var(--sw-accent), var(--sw-accent-deep));
  color: var(--sw-text-light);
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-family: var(--sw-font-body);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow var(--sw-ease), transform var(--sw-ease);
}
.sw-chat-body button[type="submit"]:hover {
  box-shadow: 0 0 14px 3px rgba(239,91,42,0.3);
  transform: translateY(-1px);
}

/* Success message */
.sw-chat-success {
  text-align: center;
  padding: 20px 0 8px;
  font-family: var(--sw-font-heading);
  font-size: 15px;
  color: var(--sw-accent);
  font-style: italic;
}

/* Inline error message */
.sw-chat-error {
  font-size: 12.5px;
  color: #ff8585;
  background: rgba(255,100,100,0.08);
  border: 1px solid rgba(255,100,100,0.2);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 10px;
  line-height: 1.5;
}


/* ─────────────────────────────────────────────────────────────
   SHARED KEYFRAMES
───────────────────────────────────────────────────────────── */
@keyframes swFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes swSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .sw-trust-card        { max-width: calc(100vw - 32px); left: 16px; bottom: 16px; }
  .sw-cookie-banner     { max-width: calc(100vw - 32px); left: 16px; right: 16px; bottom: 0;
                          border-radius: var(--sw-radius) var(--sw-radius) 0 0; }
  .sw-cookie-banner.sw-pos-bottom-left,
  .sw-cookie-banner.sw-pos-bottom-right { left: 0; right: 0; bottom: 0; max-width: 100%; }
  .sw-chat-window       { right: 12px; left: 12px; width: auto; bottom: 80px; }
  .sw-modal-content     { padding: 24px 22px 28px; }
  .sw-modal-content h3  { font-size: 20px; }
  .sw-top-bar           { font-size: 12px; gap: 8px; }
}
