:root{
  --bg:#eef3ff;
  --card:#ffffff;
  --muted:#4a5a77;
  --text:#0b1220;
  --accent:#2563eb;
  --accent2:#22c55e;
  --border:rgba(15, 23, 42, .18);
  --border_strong:rgba(15, 23, 42, .28);
  --shadow: 0 14px 34px rgba(15, 23, 42, .14);
  --radius:18px;
  --focus: 0 0 0 4px rgba(37, 99, 235, .18);
  --danger:#e11d48;
  --warn:#f59e0b;

  --field_bg:#f5f7ff;
  --field_bg2:#f8fafc;
}
*{box-sizing:border-box}
html,body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  /* Page background: light blue + light grey, with subtle layered accents */
  background:
    radial-gradient(900px circle at 12% 14%, rgba(0, 110, 212, .18) 0%, rgba(0, 110, 212, 0) 55%),
    radial-gradient(800px circle at 88% 18%, rgba(56, 189, 248, .16) 0%, rgba(56, 189, 248, 0) 52%),
    radial-gradient(1000px circle at 28% 92%, rgba(156, 163, 175, .22) 0%, rgba(156, 163, 175, 0) 58%),
    linear-gradient(135deg, #dbeafe 0%, #f3f4f6 55%, #e5e7eb 100%);
  background-attachment: fixed;
  color:var(--text);
}
.container{
  width:min(980px, calc(100% - 32px));
  margin: 32px auto 56px;
}
.header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding: 18px 18px 0;
}
.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.brand h1{
  margin:0;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing:.2px;
}
.title-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.logo-link{display:inline-flex;align-items:center;line-height:0;}
.logo-img{height:84px;width:auto;display:block;border-radius:8px;}
.title-copy{display:flex;flex-direction:column;gap:6px;}
@media (max-width: 520px){
  .logo-img{height:68px;}
}
.brand p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
  max-width: 60ch;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(15,23,42,.10);
  white-space:nowrap;
}
.card{
margin-top: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (max-width: 780px){
  .grid{grid-template-columns: 1fr;}
  .header{flex-direction:column;}
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}
label{font-weight: 750; letter-spacing: .2px; color: rgba(11,18,32,.92);}
.hint{
  font-size: 13px;
  color: var(--muted);
  line-height:1.45;
}
.soft-hint{
  margin-top:6px;
  font-size: 12.5px;
  color: rgba(74,90,119,.92);
  line-height:1.45;
}

input, select, textarea, button{
  font: inherit;
}
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], select, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 2px solid #006ed4;
  background: var(--field_bg2);
  color: var(--text);
  outline:none;
  transition: box-shadow .15s ease, background .15s ease;
}
textarea{min-height:110px; resize: vertical;}
input:focus, select:focus, textarea:focus{
  box-shadow: 0 10px 22px rgba(120,120,120,.35);
  background: #fffee8;
}
select[multiple]{min-height: 240px; padding: 10px; background: var(--field_bg); border: 2px solid #006ed4;}
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.btn{
  cursor:pointer;
  border: 1px solid var(--border_strong);
  background: rgba(255,255,255,.92);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{background: rgba(255,255,255,1); border-color: rgba(15,23,42,.32);}
.btn:active{transform: translateY(1px);}
.btn.primary{
  background: #2563eb;
  color: #ffffff;
  border: 0;
  font-weight: 750;
}
.btn.primary:hover{background:#1d4ed8;}
.btn.subtle{
  background: #e5e7eb;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,.18);
  font-weight: 750;
}
.btn.subtle:hover{background:#d1d5db;}
.notice{
margin-top: 14px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  color: var(--muted);
}
.notice.success{background:#c7ffc9; border-color: rgba(34,197,94,.35); color: rgba(15,23,42,.90);}
.notice.error{background:#fffec7; border-color: rgba(225,29,72,.35); color: rgba(15,23,42,.90);}
.notice.yellow{
  background: rgba(255, 235, 100, .55);
  border-color: rgba(234, 179, 8, .55);
  color: rgba(15,23,42,.95);
}
.notice.big{
  padding: 18px 16px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 16px;
}
.small{
  font-size: 12.5px;
  color: var(--muted);
}
.footer{
  margin-top: 18px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  color: var(--muted);
}

.autosave-indicator{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,.22);
  border-radius:14px;
  background: rgba(255,255,255,.6);
  color: rgba(15,23,42,.78);
  font-size: 12.5px;
}
.autosave-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(34,197,94,.85);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
  flex:0 0 auto;
}
.autosave-text{
  flex:1 1 auto;
}
.autosave-status{
  flex:0 0 auto;
  font-weight:700;
  color: rgba(15,23,42,.75);
  background: rgba(15,23,42,.06);
  border:1px solid rgba(15,23,42,.14);
  padding:6px 10px;
  border-radius:999px;
}
.autosave-status.is-saving{
  color: rgba(15,23,42,.75);
  background: rgba(15,23,42,.08);
}
.autosave-status.is-saved{
  color: rgba(15,23,42,.85);
  background: rgba(34,197,94,.10);
  border-color: rgba(34,197,94,.30);
}


hr.sep{border:0; border-top:1px solid rgba(15,23,42,.14); margin: 16px 0;}


.repeat-list{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}


.inline-actions{display:flex;gap:10px;align-items:center;margin-top:10px;}
.hint-inline{font-size:12px;opacity:.75;}
.btn.small{padding:8px 10px;font-size:13px;}
.btn.ghost{background:transparent;border:1px solid rgba(0,0,0,.18);} 

#continentSelect{width:auto;}


/* Match date inputs styling with other fields */
input[type="date"]{
  width: 100%;
  padding: 14px 14px;
  border: 2px solid #006ed4;
  border-radius: 12px;
  background: rgba(255,255,255,0.85);
  color: #0f172a;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="date"]:focus{
  border-color: #006ed4;
  box-shadow: 0 10px 22px rgba(120,120,120,.35);
  background: #fffee8;
}




/* Countries toolbar: keep all controls on ONE line on desktop */
.countries-tools{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:nowrap;
}

/* Search should be flexible but NOT too long */
.countries-tools #countrySearch{
  flex: 1 1 260px;      /* can grow/shrink */
  min-width: 180px;
  max-width: 320px;     /* prevents becoming too long */
}

.countries-tools #continentSelect{
  width: 190px;
  flex: 0 0 auto;
}

.countries-tools .btn{
  flex: 0 0 auto;
  white-space: nowrap;
}

/* On smaller screens, allow wrapping for usability */
@media (max-width: 820px){
  .countries-tools{
    flex-wrap:wrap;
  }
  .countries-tools #countrySearch{
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
}
.countries-tools #countrySearch{
    flex: 1 1 100%;
    min-width: 0;
  }
}


.checkline{display:flex;align-items:center;gap:10px;margin-top:10px;color:var(--text);}
.checkline input{width:auto !important;}

/* Repeat list spacing + remove button */
.repeat-item{display:flex;align-items:center;gap:12px;margin:10px 0;}
.repeat-input{flex:1;}
.btn.mini{padding:8px 12px;font-size:13px;border-radius:10px;}
.btn.mini.danger{border-color:#d9d9d9;background:#ffffff;color:#555;}
.btn.mini.danger:hover{background:#f6f6f6;}

/* Required / Optional badges */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  margin-left:10px;
  border:1px solid transparent;
  vertical-align:middle;
}
.badge.required{
  color:#8a1f1f;
  background:#ffecec;
  border-color:#ffb3b3;
}
.badge.optional{
  color:#0b4aa6;
  background:#eaf2ff;
  border-color:#b7d2ff;
}
.label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.label-row .label-text{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
}

/* Download As PDF button */
.btn.danger{
  background: #ef4444 !important;
  color: #ffffff !important;
  border: 0 !important;
  font-weight: 750;
}
.btn.danger:hover{background:#dc2626 !important;}

/* WhatsApp button */
#sendToWhatsappBtn.btn.subtle{
  background: #22c55e !important;
  color: #ffffff !important;
  border: 0 !important;
}
#sendToWhatsappBtn.btn.subtle:hover{background:#16a34a !important;}

/* Small grey help icon next to Required/Optional badges */
.help-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-left:8px;
  border-radius:50%;
  border:1px solid #cfcfcf;
  color:#7a7a7a;
  background:#f3f3f3;
  font-size:12px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  user-select:none;
  vertical-align:middle;
}
.help-icon:hover{
  background:#e9e9e9;
  border-color:#bdbdbd;
  color:#5f5f5f;
}

/* Extra fee badge shown after the “?” icon */
.fee-badge{
  display:inline-block;
  margin-left:6px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid #006ed4;
  background:#eaf5ff;
  color:#003a70;
  font-weight:800;
  font-size:12px;
  line-height:1.2;
  vertical-align:middle;
  white-space:nowrap;
}

/* Mobile-friendly tooltip for help icons */
.help-tooltip{
  position:fixed;
  z-index:9999;
  max-width:min(320px, calc(100vw - 24px));
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #d7d7d7;
  background:#fffff2;
  color:#2b2b2b;
  font-size:13px;
  line-height:1.35;
  box-shadow:0 10px 30px rgba(0,0,0,0.18);
  display:none;
}
.help-tooltip.is-open{ display:block; }
.help-tooltip .help-tooltip-title{
  font-weight:700;
  color:#1f2937;
  margin-bottom:6px;
}


/* Auto-hide notice */
.notice.is-hidden{display:none !important;}


/* Extra fee summary box (below Notes) */
.fee-summary-box{
  width:100%;
  background:#feffdb;
  color:#02379c;
  font-weight:900;
  font-size:18px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #f1ec9b;
  box-shadow:rgba(0,0,0,0.12) 0px 2px 8px;
  margin-top:10px;
  margin-bottom:16px; /* space so it does not touch the next option */
}

/* --- Sticky total price summary (v16.2.63) --- */
.sticky-price{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 36px);
  /* Use RGBA background so inner boxes keep 100% opacity */
  background: rgba(255,255,224,.85);
  border: 2px solid rgba(0,0,0,.28);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  padding: 14px 14px 12px;
  transition: background-color .18s ease-in-out;
}
.sticky-price:hover{ background: rgba(255,255,224,1); }
.sticky-price__title{
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  color: #0d1b2a;
  margin: 0 0 10px;
}
.sticky-price__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sticky-price__item{
  background: rgba(0,0,0,.03);
  border: 2px solid rgba(0,0,0,.16);
  border-radius: 12px;
  padding: 10px 10px;
}
.sticky-price__label{
  font-size: 12px;
  color: rgba(0,0,0,.65);
  margin-bottom: 4px;
}
.sticky-price__value{
  font-size: 14px;
  font-weight: 700;
  color: #111;
}
.sticky-price__total{
  grid-column: 1 / -1;
  background: rgba(0, 191, 255, .10);
  border-color: rgba(0, 191, 255, .55);
}
.sticky-price__total .sticky-price__value{
  font-size: 18px;
  font-weight: 900;
}
.sticky-price__line{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0,0,0,.70);
  line-height: 1.35;
}

.sticky-price__toggle{
  margin-top: 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,.28);
  background: rgba(255,255,255,.55);
  color: #0d1b2a;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.sticky-price__toggle:hover{
  background: rgba(255,255,255,.78);
}
.sticky-price__toggle:active{
  transform: translateY(1px);
}

.sticky-price__breakdown{
  margin-top: 10px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,.16);
  background: rgba(255,255,255,.60);
  padding: 10px;
}
.sticky-price__breakdown-title{
  font-weight: 900;
  font-size: 13px;
  color: #0d1b2a;
  margin-bottom: 8px;
}
.sticky-price__breakdown-list{
  display: grid;
  gap: 6px;
}
.sticky-price__breakdown-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  color: rgba(0,0,0,.78);
}
.sticky-price__breakdown-row strong{
  font-weight: 900;
  color: rgba(0,0,0,.86);
}
.sticky-price__breakdown-empty{
  font-size: 12px;
  color: rgba(0,0,0,.70);
}

@media (max-width: 720px){
  .sticky-price{
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 12px 12px 10px;
  }
}

/* Ensure fixed summary never covers the submit buttons (JS sets an exact padding based on the box height) */
body.has-sticky-price{ padding-bottom: 0; }

/* Search Traffic - Clear selection button (more visible) */
#clear_search_sources.btn{
  background: rgba(224,224,224,1);
  color: #000;
  border-color: rgba(0,0,0,.35);
}
#clear_search_sources.btn:hover{
  background: rgba(210,210,210,1);
  color: #000;
  border-color: rgba(0,0,0,.45);
}

/* Social Traffic - Clear selection button (more visible) */
#clear_social_sources.btn{
  background: rgba(224,224,224,1);
  color: #000;
  border-color: rgba(0,0,0,.35);
}
#clear_social_sources.btn:hover{
  background: rgba(210,210,210,1);
  color: #000;
  border-color: rgba(0,0,0,.45);
}

/* AI Referral Traffic - Clear selection button (more visible) */
#clear_ai_referral_sources.btn{
  background: rgba(224,224,224,1);
  color: #000;
  border-color: rgba(0,0,0,.35);
}
#clear_ai_referral_sources.btn:hover{
  background: rgba(210,210,210,1);
  color: #000;
  border-color: rgba(0,0,0,.45);
}



/* Referral Traffic - Clear selection button (more visible) */
#clear_referral_sources.btn{
  background: rgba(224,224,224,1);
  color: #000;
  border-color: rgba(0,0,0,.35);
}
#clear_referral_sources.btn:hover{
  background: rgba(210,210,210,1);
  color: #000;
  border-color: rgba(0,0,0,.45);
}
