/* =========================================================
   BVDU Online MBA · IIT Madras Pravartak festive popup + form
   ---------------------------------------------------------
   Desktop: navy panel on the left, details on the right.
   Mobile (under 760px): one column, navy panel on top.
   ========================================================= */

/* ---------- 1. Colours, fonts, timing ---------- */
:root {
  --brand: #ef7f14;          /* orange: buttons, ticks */
  --brand-700: #c4600b;      /* orange hover */
  --brand-200: #f9cf9f;      /* ring around the button */
  --gold: #ffb347;           /* kicker + headline highlight */
  --navy: #0e1e3e;
  --navy-top: #14284f;       /* navy panel gradient start */
  --navy-bottom: #0b1a36;    /* navy panel gradient end */
  --ink: #0e1e3e;            /* headings */
  --body: #46536b;           /* body text */
  --muted: #7a8599;
  --line: #e8e2da;           /* input borders */

  --display: 'Poppins', system-ui, sans-serif;
  --text: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 2. Base (remove if your site already has a reset) ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--text); color: var(--body); background: #eef1f6; min-height: 100vh; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; }

/* Demo page only – delete on the live page */
.demo { max-width: 640px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.demo h1 { font-family: var(--display); color: var(--ink); font-size: 24px; }
.demo p { margin: 10px 0 22px; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--brand); color: #fff;
  font-weight: 700; font-size: 16px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-200), 0 10px 24px -10px rgba(239, 127, 20, .7);
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--brand-700); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }

.later {
  display: block; width: 100%; margin-top: 18px;
  background: none; border: 0;
  font-size: 15.5px; font-weight: 600; color: var(--muted);
}
.later:hover { color: var(--ink); }

/* ---------- 4. Overlay ---------- */
.ov {
  position: fixed; inset: 0; z-index: 70;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(11, 26, 54, .62);
  backdrop-filter: blur(3px);
}
.ov.open { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ---------- 5. Card (two columns) ---------- */
.sp {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; max-width: 1000px;
  max-height: calc(100vh - 40px); overflow: auto;
  border-radius: 18px; background: #fff;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5);
  animation: pop .4s var(--ease) both;
}
.sp-side { display: flex; flex-direction: column; }

/* Close button */
.sp-x {
  position: absolute; top: 54px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 22px; line-height: 1;
}
.sp-x:hover { background: rgba(255, 255, 255, .26); }

/* ---------- 7. Navy panel ---------- */
.sp-top {
  position: relative; overflow: hidden;
  padding: 62px 30px 24px;
  text-align: center; color: #fff;
  background: linear-gradient(160deg, var(--navy-top), var(--navy-bottom));
}
/* Toran (garland) hanging along the top of the navy panel */
.sp-top::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 46px;
  background: url("../assets/toran.svg") repeat-x 0 0 / 80px 48px;
  pointer-events: none;
}
.sp-top > *:not(.fwb) { position: relative; }

.sp-uni {
  display: block; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
}
.kick {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
}
.sp-top h2 { margin-top: 8px; font-family: var(--display); font-size: 24px; line-height: 1.25; color: #fff; }
.sp-top h2 span { color: var(--gold); }

/* Gold "Certification by IIT Madras Pravartak" block */
.iitm {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  max-width: 340px; margin: 12px auto 4px; padding: 10px 18px;
  border-top: 1px solid rgba(246, 210, 122, .45);
  border-bottom: 1px solid rgba(246, 210, 122, .45);
}
.iitm span {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.iitm b {
  font-family: var(--display); font-size: 27px; line-height: 1.15; font-weight: 700;
  background: linear-gradient(90deg, #f6d27a, #ffe9b0 45%, #e2a93b);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.iitm em { font-style: normal; font-size: 14px; font-weight: 600; color: #fff; margin-top: 2px; }

/* ---------- 8. White details panel ---------- */
.sp-bd { display: flex; flex-direction: column; padding: 22px 30px; }

.lead { margin-bottom: 14px; text-align: center; font-size: 14.5px; }
.lead b { display: block; margin-bottom: 6px; font-family: var(--display); font-size: 17px; color: var(--ink); }

/* MBA + Certification boxes */
.eq { display: flex; align-items: stretch; gap: 8px; margin-bottom: 16px; }
.eq > span {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 10px 8px; border-radius: 12px; text-align: center;
  font-family: var(--display); font-size: 13.5px; font-weight: 700; line-height: 1.25;
}
.eq-a { background: #f3f5f9; color: var(--ink); border: 1px solid var(--line); }
.eq-b { background: linear-gradient(135deg, #0e1e3e, #24406f); color: #f6d27a; box-shadow: 0 0 0 2px #e2a93b; }
.eq-b small { margin-top: 2px; font-family: var(--text); font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.eq i { align-self: center; font-style: normal; font-weight: 800; font-size: 20px; color: var(--brand); }

/* Tick points */
.pts { display: grid; gap: 8px; margin: 2px 0 18px; }
.pts li { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink); }
.pts li b { color: var(--ink); }
.pts li::before {
  content: "✓"; flex: none; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
}

.note { margin-top: 10px; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; }
.sp-tc { align-self: center; margin-top: 6px; font-size: 12px; color: #2563eb; }

/* ---------- 9. Layout: navy panel on the LEFT ---------- */
.sp--navy { max-width: 960px; }
.sp--navy .sp-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.sp--navy .sp-top { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 80px 36px 40px; }
.sp--navy .sp-top h2 { font-size: 28px; }
.sp--navy .sp-bd { justify-content: center; padding: 44px 36px 28px; }
.sp--navy .sp-x { top: 14px; background: #eef0f4; color: #111; }
.sp--navy .sp-x:hover { background: #e2e5eb; }

/* ---------- 10. Form ---------- */
form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sp-row > div { min-width: 0; }

.l { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
input[type=text], input[type=email], input[type=tel] {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239, 127, 20, .15); }

.ph { display: flex; gap: 8px; }
.ph input { min-width: 0; }
.ph span {
  flex: none; display: grid; place-items: center; width: 52px; height: 46px;
  border: 1.5px solid var(--line); border-radius: 12px; color: var(--muted);
}

/* Highest qualification chips */
.chips { display: flex; gap: 6px; }
.chips label { flex: 1 1 auto; min-width: 0; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 4px 6px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap;
  cursor: pointer; transition: all .2s;
}
.chips input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(239, 127, 20, .3); }

.cons { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.cons input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); }
.cons a { color: var(--body); }

.err { font-size: 13px; font-weight: 600; color: #c0392b; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; }   /* spam trap, keep hidden */

/* Thank-you screen */
.done { padding: 10px 0 6px; text-align: center; }
.done .tk {
  display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 12px;
  border-radius: 50%; background: #1f9d5b; color: #fff; font-size: 28px;
}
.done h3 { font-family: var(--display); font-size: 20px; color: var(--ink); }
.done p { margin-top: 6px; font-size: 14px; }

/* Form card heading */
.sp--form .sp-top { padding-bottom: 18px; }
.sp--form .sp-top h2 { font-size: 22px; }
.sp--form.sp--navy .sp-top h2 { font-size: 30px; }

/* ---------- 11. Fireworks (built by popup.js from data-fireworks) ---------- */
.fwb { position: absolute; inset: 0; pointer-events: none; }
.fw { position: absolute; width: 0; height: 0; transform: scale(var(--s)); }
.fw i {
  position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 6px var(--c); opacity: 0;
  animation: burst 6s cubic-bezier(.2, .7, .3, 1) infinite; animation-delay: var(--dl);
}
.fw::after {
  content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: 30px;
  background: linear-gradient(var(--c), transparent); opacity: 0;
  animation: rise 6s ease-out infinite; animation-delay: calc(var(--dl) - .5s);
}
@keyframes burst {
  0%   { opacity: 0;   transform: rotate(var(--a)) translateY(0) scale(1); }
  4%   { opacity: 1; }
  30%  { opacity: .85; transform: rotate(var(--a)) translateY(-50px) scale(.9); }
  45%, 100% { opacity: 0; transform: rotate(var(--a)) translateY(-60px) scale(.3); }
}
@keyframes rise {
  0%   { opacity: 0;  transform: translateY(80px); }
  5%   { opacity: .7; }
  8%   { opacity: 0;  transform: translateY(0); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fw i, .fw::after { animation: none; } }

/* ---------- 12. Mobile ---------- */
@media (max-width: 760px) {
  .sp { grid-template-columns: 1fr; max-width: 440px; }
  .sp--navy .sp-side { grid-template-columns: 1fr; }

  /* hide the extras to keep it clean */
  .sp-uni, .sp-top .fwb, .sp-hm, .sp--popup .pts { display: none; }

  .sp-top, .sp--navy .sp-top { padding: 56px 20px 18px; }
  .sp-top h2, .sp--navy .sp-top h2 { font-size: 18px; }
  .sp--form .sp-top h2, .sp--form.sp--navy .sp-top h2 { font-size: 19px; }
  .kick { padding: 0 34px; font-size: 10.5px; letter-spacing: .1em; }  /* clear of the close button */
  .iitm { margin: 8px auto 2px; padding: 8px 12px; }
  .iitm b { font-size: 23px; }
  .iitm em { font-size: 12.5px; }

  .sp-bd, .sp--navy .sp-bd { padding: 16px 18px 14px; }
  .lead { margin-bottom: 12px; }
  .lead b { margin: 0; font-size: 16px; }
  .eq { margin-bottom: 14px; }
  .eq > span { font-size: 12.5px; }
  .later { margin-top: 14px; font-size: 14.5px; }
  .note { margin-top: 6px; font-size: 11px; }
  .sp-tc { margin-top: 2px; font-size: 11px; }

  .sp-x, .sp--navy .sp-x { top: 52px; right: 10px; background: rgba(255, 255, 255, .14); color: #fff; }

  .sp-row { grid-template-columns: 1fr; }
  input[type=text], input[type=email], input[type=tel], .ph span { height: 44px; }
}
@media (max-width: 380px) {
  .chips { flex-wrap: wrap; }
  .chips label { flex: 1 1 40%; }
  .chips span { font-size: 12px; }
}

/* Root banner and brochure forms: form-design visual reference only.
   Keep existing controls, country selector, error visibility and OTP handlers. */
#main-form-body {
  padding: 24px 22px 20px;
  border-top: 5px solid #ffca28;
  border-radius: 18px;
  background: #fff;
  color: #303033;
  min-width: 0;
}
#main-form-body .form-design-header { text-align: center; margin-bottom: 18px; }
.form-design-deadline {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fbe4ec;
  color: #b71948;
  font: 700 12px/1.4 var(--text);
  letter-spacing: .3px;
  text-transform: uppercase;
}
#main-form-body .form-design-header h3,
#popup-form .form-design-header h3 {
  font-family: var(--text);
  color: #303033;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.5px;
  margin: 0 0 8px;
}
#main-form-body .form-design-header p,
#popup-form .form-design-header p {
  font-size: 14px;
  line-height: 1.5;
  color: #606064;
  margin: 0;
}
#main-form, #popup-form {
  padding: 0;
  gap: 14px;
  min-width: 0;
  font-family: var(--text);
  color: #303033;
}
#main-form > *, #popup-form > * { margin-top: 0; margin-bottom: 0; min-width: 0; }
#main-form .grid, #popup-form .grid { gap: 12px; }
#main-form > .form-design-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#popup-form > .form-design-names { grid-template-columns: minmax(0, 1fr); }
/* The popup reference stacks email and phone; retain both existing wrappers. */
#popup-form > .grid { grid-template-columns: minmax(0, 1fr); }
#popup-form > .form-design-names { grid-template-columns: minmax(0, 1fr); }
#main-form label:not([for="terms"]),
#popup-form label:not([for="popup-terms"]) {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #303033;
}
#main-form input:not([type="hidden"]):not([type="checkbox"]),
#main-form select,
#popup-form input:not([type="hidden"]):not([type="checkbox"]),
#popup-form select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #ece1e5;
  border-radius: 10px;
  background: #fff;
  color: #303033;
  font-family: inherit;
  font-size: 15px;
  padding: 0 12px;
}
#main-form select, #popup-form select { padding-right: 28px; }
#main-form input::placeholder, #popup-form input::placeholder { color: #858589; opacity: 1; }
#main-form input:focus-visible, #main-form select:focus-visible,
#popup-form input:focus-visible, #popup-form select:focus-visible {
  outline: 2px solid #bd194f;
  outline-offset: 2px;
}
/* Separate dial-code and mobile boxes in both forms. */
#main-form .iti, #popup-form .iti {
  display: flex;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
#main-form .iti__flag-container, #popup-form .iti__flag-container {
  position: static;
  flex: 0 0 auto;
  min-width: 56px;
  padding: 0;
}
#main-form .iti input, #popup-form .iti input {
  flex: 1 1 0;
  width: 0;
  height: 56px;
  padding: 0 16px !important;
  border-radius: 13px;
  font-size: 18px;
}
#main-form .iti__selected-flag, #popup-form .iti__selected-flag {
  justify-content: center;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #ece1e5;
  border-radius: 13px;
  background: #fff;
  color: #858589;
  font-size: 18px;
}

#main-form .iti__selected-flag .iti__flag, #popup-form .iti__selected-flag .iti__flag,
#main-form .iti__arrow, #popup-form .iti__arrow { display: none; }
#main-form .iti__selected-dial-code, #popup-form .iti__selected-dial-code { margin-left: 0; }
#main-form .iti__country-list, #popup-form .iti__country-list {
  max-width: min(340px, calc(100vw - 64px));
  white-space: normal;
}
#main-form input[type="checkbox"], #popup-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: #bd194f;
  margin-top: 2px;
}
#main-form label[for="terms"], #popup-form label[for="popup-terms"] {
  font-size: 13px;
  line-height: 1.45;
  color: #858589;
  margin-left: 12px;
}
#main-form label[for="terms"] a, #popup-form label[for="popup-terms"] a {
  color: inherit;
  text-decoration: underline;
}
#main-form button[type="submit"], #popup-form button[type="submit"] {
  width: 100%;
  min-height: 50px;
  height: auto;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(110deg, #bd194f, #d35c80 23%, #bd194f 48%) !important;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  box-shadow: 0 6px 14px rgba(150, 20, 65, .08);
}
#popup-form button[type="submit"] span[aria-hidden] { margin-left: 10px; }
#main-form button[type="submit"] {
  background: #1dce5b !important;
  box-shadow: 0 6px 14px rgba(20, 160, 70, .08);
}
#main-form button[type="submit"]:hover, #popup-form button[type="submit"]:hover { filter: brightness(.95); }
#main-form button[type="submit"]:focus-visible, #popup-form button[type="submit"]:focus-visible {
  outline: 2px solid #bd194f;
  outline-offset: 3px;
}
#main-form [id$="-error"], #popup-form [id$="-error"] { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
#gwj-popup[data-step="form"] .gwj-box {
  max-width: 432px;
  border-top: 5px solid #ffca28;
  border-radius: 16px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#gwj-popup[data-step="form"] .gwj-body { padding: 26px 20px 20px; }
#popup-form .form-design-header { margin-bottom: 4px; padding-right: 26px; }
#gwj-popup[data-step="form"] .gwj-close {
  top: 12px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 1px solid #ece1e5;
  background: #fff;
  color: #303033;
}
#gwj-popup[data-step="form"] .gwj-close:hover { background: #fcf3f6; }
#gwj-popup[data-step="form"] .gwj-disclaimer {
  margin: 14px 0 0;
  color: #858589;
  font: 12px/1.5 var(--text);
  text-align: center;
}
@media (max-width: 380px) {
  #main-form-body { padding: 20px 14px; }
  #main-form > .form-design-names, #popup-form > .form-design-names { grid-template-columns: minmax(0, 1fr); }
  #gwj-popup { padding: 12px; }
  #gwj-popup[data-step="form"] .gwj-body { padding: 26px 14px 18px; }
  #main-form-body .form-design-header h3, #popup-form .form-design-header h3 { font-size: 21px; }
}
@supports not (height: 100dvh) {
  #gwj-popup[data-step="form"] .gwj-box { max-height: calc(100vh - 32px); }
}

/* Contact preference tabs adapted from form-design; no runtime folder dependency. */
#main-form-body .banner-contact-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 14px 0 16px;
  border-radius: 12px;
  background: #fcf3f6;
}

#popup-form label:not([for="popup-terms"]) span {
    padding: 10px 17px !important;
}

#main-form-body .banner-contact-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  padding: 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #606064;
  font: 600 14px/1.4 var(--text);
}
#main-form-body .banner-contact-tabs button[aria-selected="true"] {
  background: #fff;
  color: #bd194f;
  box-shadow: 0 3px 9px rgba(130, 30, 60, .06);
}
#main-form-body .banner-contact-tabs button:focus-visible {
  outline: 2px solid #bd194f;
  outline-offset: 1px;
}
#main-form-body .banner-contact-icon { font-size: 18px; flex-shrink: 0; }
#main-form-body #banner-whatsapp-tab .banner-contact-icon { color: #1dce5b; }
#main-form[data-contact-intent="callback"] button[type="submit"] {
  background: #bd194f !important;
}
@media (max-width: 380px) {
  #main-form-body .banner-contact-tabs button { font-size: 12px; gap: 4px; }
}

/* Shared banner and popup education options. */
.education-label { margin-bottom: 8px; font-family: Arial, sans-serif; font-size: 13px; font-weight: 500; color: #333; }
.education-choices { display: flex; flex-wrap: nowrap; gap: 6px; }
.education-choice { position: relative; cursor: pointer; }
.education-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.education-choice span { display: block; padding: 8px 10px; border: 1px solid #e9e1e5; border-radius: 999px; background: #fff; color: #333; font-family: Arial, sans-serif; font-size: 13px; line-height: 18px; white-space: nowrap;     height: stretch;     align-content: center; }
#main-form .education-choice { flex: 1; min-width: 0; }
#main-form .education-choice span { text-align: center; white-space: normal; }
.education-choice input:checked + span { border-color: #b60649; background: #fff1f6; color: #b60649; }
.education-choice input:focus-visible + span { outline: 2px solid #b60649; outline-offset: 3px; }
.education-native-select[hidden] { display: none !important; }

@media (max-width: 380px) {
  .education-choices { gap: 4px; }
  .education-choice span { padding: 8px 6px; font-size: 11px; }
}
