/* ============================================================
   A.I. Skin Revolution — Popup Booking Component
   Depends on: Cormorant Garamond + Quicksand (already loaded)
   Brand tokens inherited from style.css :root
   ============================================================ */

/* ── OVERLAY ───────────────────────────────────────────────── */
.bk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 15, 10, .68);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .42s ease;
}
.bk-overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* ── MODAL BOX ─────────────────────────────────────────────── */
.bk-box {
  background: var(--white);
  border-radius: 26px;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(32px) scale(.96);
  transition: transform .42s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 40px 120px rgba(42,31,26,.3);
  scrollbar-width: none;
}
.bk-box::-webkit-scrollbar { display: none; }
.bk-overlay.show .bk-box {
  transform: translateY(0) scale(1);
}

/* ── HEADER GRADIENT ───────────────────────────────────────── */
.bk-head {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  padding: 32px 44px 0;
  position: relative;
  border-radius: 26px 26px 0 0;
  overflow: hidden;
}
.bk-head::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.12) 0%, transparent 60%);
  pointer-events: none;
}
.bk-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.bk-head-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--white);
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.15;
}
.bk-head-text p {
  color: rgba(255,255,255,.78);
  font-size: .86rem;
  font-family: 'Quicksand', sans-serif;
}

/* ── CLOSE BUTTON ──────────────────────────────────────────── */
.bk-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .95rem;
  transition: background .18s ease, transform .18s ease;
  flex-shrink: 0;
  border: none;
  font-family: inherit;
}
.bk-close:hover {
  background: rgba(255,255,255,.36);
  transform: rotate(90deg);
}

/* ── TAB SWITCH ────────────────────────────────────────────── */
.bk-tabs {
  display: flex;
  background: rgba(0,0,0,.18);
  border-radius: 50px;
  padding: 4px;
  margin: 22px 0 0;
  position: relative;
  gap: 0;
}
.bk-tab-btn {
  flex: 1;
  padding: 10px 18px;
  border-radius: 44px;
  font-family: 'Quicksand', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: color .28s ease, background .28s ease, box-shadow .28s ease;
  background: transparent;
  border: none;
  text-align: center;
  position: relative;
  z-index: 1;
}
.bk-tab-btn.active {
  background: var(--white);
  color: var(--gold-dark);
  box-shadow: 0 4px 18px rgba(42,31,26,.22);
}
.bk-tab-btn:not(.active):hover {
  color: rgba(255,255,255,.9);
}

/* ── TAB INDICATOR LINE ─────────────────────────────────────── */
.bk-tab-bar {
  height: 3px;
  background: rgba(255,255,255,.18);
  border-radius: 2px;
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}
.bk-tab-bar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background: rgba(255,255,255,.7);
  border-radius: 2px;
  transition: left .32s cubic-bezier(.25,.46,.45,.94);
  left: 0;
}
.bk-tab-bar[data-active="consultation"]::after {
  left: 50%;
}

/* ── BODY ───────────────────────────────────────────────────── */
.bk-body {
  padding: 32px 44px 40px;
}

/* ── FORM PANELS ────────────────────────────────────────────── */
.bk-panel {
  display: none;
  animation: bkFadeIn .28s ease forwards;
}
.bk-panel.active {
  display: block;
}
@keyframes bkFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FORM ELEMENTS (scoped) ─────────────────────────────────── */
.bk-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.bk-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.bk-form .form-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mocha);
  font-family: 'Quicksand', sans-serif;
}
.bk-form .req { color: var(--gold); }

.bk-form .form-ctrl {
  padding: 13px 16px;
  border: 1.5px solid rgba(191,124,46,.22);
  border-radius: 12px;
  font-size: .91rem;
  background: var(--cream, #FAF6F4);
  color: var(--text, #3A2820);
  transition: border-color .18s ease, box-shadow .18s ease;
  width: 100%;
  font-family: 'Quicksand', sans-serif;
}
.bk-form .form-ctrl:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(191,124,46,.12);
}
.bk-form .form-ctrl.error {
  border-color: #e05555;
  box-shadow: 0 0 0 3px rgba(224,85,85,.1);
}
.bk-form textarea.form-ctrl {
  min-height: 90px;
  resize: vertical;
}
.bk-form select.form-ctrl {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23BF7C2E' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

/* ── FIELD ERROR MESSAGE ─────────────────────────────────────── */
.bk-field-err {
  font-size: .72rem;
  color: #e05555;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  margin-top: -4px;
  display: none;
}
.bk-form .form-ctrl.error + .bk-field-err,
.bk-form .form-group.has-error .bk-field-err {
  display: block;
}

/* ── CAPTCHA ─────────────────────────────────────────────────── */
.bk-captcha {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream, #FAF6F4);
  border: 1.5px solid rgba(191,124,46,.22);
  border-radius: 12px;
  padding: 12px 16px;
}
.bk-captcha-question {
  font-size: .85rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  color: var(--mocha, #2A1F1A);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}
.bk-captcha-eq {
  font-weight: 700;
  color: var(--gold, #BF7C2E);
  margin: 0 4px;
}
.bk-captcha-input {
  width: 80px;
  padding: 8px 12px;
  border: 1.5px solid rgba(191,124,46,.3);
  border-radius: 8px;
  font-size: .91rem;
  font-family: 'Quicksand', sans-serif;
  text-align: center;
  background: var(--white, #fff);
  color: var(--mocha, #2A1F1A);
  transition: border-color .18s ease;
  flex-shrink: 0;
}
.bk-captcha-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(191,124,46,.12);
}
.bk-captcha-input.error {
  border-color: #e05555;
}
.bk-captcha-refresh {
  background: none;
  border: none;
  color: var(--gold, #BF7C2E);
  cursor: pointer;
  font-size: .95rem;
  padding: 4px;
  flex-shrink: 0;
  transition: transform .3s ease;
  line-height: 1;
}
.bk-captcha-refresh:hover { transform: rotate(180deg); }

/* ── SUBMIT BUTTON ───────────────────────────────────────────── */
.bk-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 32px;
  border-radius: 60px;
  background: linear-gradient(135deg, var(--gold, #BF7C2E) 0%, var(--gold-dark, #8A5A1E) 100%);
  color: var(--white, #fff);
  font-family: 'Quicksand', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 28px rgba(191,124,46,.38);
  transition: transform .22s ease, box-shadow .22s ease;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.bk-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.13);
  transform: translateX(-101%);
  transition: transform .34s ease;
}
.bk-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(191,124,46,.5);
}
.bk-submit:hover::after { transform: translateX(0); }
.bk-submit i { font-size: .8rem; transition: transform .18s ease; }
.bk-submit:hover i { transform: translateX(3px); }

.bk-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ── SUCCESS STATE ───────────────────────────────────────────── */
.bk-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 12px;
  animation: bkFadeIn .4s ease forwards;
}
.bk-success.show { display: flex; }
.bk-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold, #BF7C2E), var(--gold-dark, #8A5A1E));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white, #fff);
  font-size: 1.8rem;
  margin-bottom: 20px;
  box-shadow: 0 12px 32px rgba(191,124,46,.35);
  animation: bkPop .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes bkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.bk-success h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  color: var(--mocha, #2A1F1A);
  margin-bottom: 8px;
}
.bk-success p {
  font-family: 'Quicksand', sans-serif;
  color: var(--gray, #686969);
  font-size: .91rem;
  line-height: 1.7;
  max-width: 380px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .bk-head  { padding: 26px 22px 0; }
  .bk-body  { padding: 24px 22px 32px; }
  .bk-head-text h3 { font-size: 1.55rem; }
  .bk-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .bk-tab-btn { font-size: .65rem; padding: 9px 10px; }
  .bk-captcha { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 400px) {
  .bk-box { border-radius: 18px; }
  .bk-head { border-radius: 18px 18px 0 0; }
}
