/* ============================================================
   Crystal Spa Center — Mobil Uygulama Stili
   Navy & Gold | App-First Design
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #9c7213;
  --gold-light: #c59324;
  --gold-pale: #fff3f8;
  --navy: #4a1254;
  --navy-mid: #7c3aed;
  --navy-light: #8b5cf6;
  --cream: #fffafd;
  --cream-2: #f0dce3;
  --white: #ffffff;
  --text: #000000;
  --text-mid: #333333;
  --text-light: #666666;
  --green-wa: #25D366;
  --success: #16a34a;
  --error: #dc2626;
  --app-header: 56px;
  --bottom-bar: 80px;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 2px 16px rgba(74, 18, 84, .08);
  --shadow-md: 0 6px 28px rgba(74, 18, 84, .12);
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

html,
body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── App Header ──────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-header);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .06);
  border-bottom: 1px solid #e0e0e0;
}

.app-header.lang-open {
  z-index: 210 !important;
}

.app-page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dil Dropdown */
.lang-dropdown-wrap {
  position: relative;
}

.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
  color: #000000;
}

.lang-dropdown-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--gold-light);
}

.lang-btn-globe {
  color: #000000;
  stroke: currentColor;
}

.lang-btn-code {
  font-size: 12px;
  font-weight: 600;
  color: #000000;
  letter-spacing: .5px;
}

.lang-caret {
  stroke: #000000;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.lang-dropdown-btn[aria-expanded="true"] .lang-caret {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 140px;
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(13, 27, 62, .18);
  overflow: hidden;
  display: none;
  z-index: 200;
  animation: dropIn .15s ease;
}

.lang-dropdown.open {
  display: block;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translate(-50%, -55%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--text);
  transition: background var(--transition);
  border-bottom: 1px solid var(--cream-2);
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: var(--cream);
}

.lang-option.active {
  background: var(--gold-pale);
  color: var(--navy);
  font-weight: 600;
}

.lang-option svg {
  margin-left: auto;
  stroke: var(--gold);
}

/* ── Ana Scroll Alanı ────────────────────────────────────── */
.app-main {
  margin-top: var(--app-header);
  padding-top: 4px;
  padding-bottom: calc(var(--bottom-bar) + 16px);
  min-height: calc(100vh - var(--app-header));
}

/* ── Form Bölümleri ──────────────────────────────────────── */
.form-section {
  display: none;
  background: var(--white);
  margin: 4px 4px 10px 4px;
  border-radius: var(--radius);
  padding: 14px 8px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(232, 224, 216, .7);
}

.corporate-alert {
  display: none;
}

.form-section.active {
  display: block;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: .3px;
  text-transform: uppercase;
}

.section-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Kişi Sayacı ─────────────────────────────────────────── */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.counter-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--cream);
  border: 1.5px solid var(--cream-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.counter-btn {
  width: 40px;
  height: 38px;
  background: none;
  border: none;
  font-size: 20px;
  font-weight: 300;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.counter-btn:hover,
.counter-btn:active {
  background: var(--navy);
  color: var(--white) !important;
}

.counter-num {
  min-width: 40px;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}

/* ── İki Sütun ───────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Alan Grupları ───────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: .3px;
}

.app-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--cream);
  border: 1.5px solid var(--cream-2);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.app-input:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(156, 114, 19, .15);
}

.app-input.error,
.app-input-row.error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15) !important;
}

.app-input[readonly] {
  color: var(--text) !important;
  opacity: 1 !important;
  cursor: pointer;
  background-color: var(--white) !important;
}

.app-textarea {
  resize: vertical;
  min-height: 80px;
}

.field-err,
.field-err.show,
.input-wrap-right .field-err,
.input-wrap-right .field-err.show {
  display: none !important;
}


/* ── Paket Kartları ──────────────────────────────────────── */
.pkg-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.pkg-card {
  border: 2px solid var(--cream-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  background: var(--white);
  position: relative;
}

.pkg-card:hover {
  border-color: rgba(156, 114, 19, .4);
}

.pkg-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(156, 114, 19, .2);
  background: linear-gradient(135deg, #fffafd 0%, #fff0f6 100%);
}

.pkg-card-inner {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  gap: 8px;
}

/* Checkmark ikonı */
.pkg-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--cream-2);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.pkg-check svg {
  width: 10px;
  height: 10px;
  stroke: transparent;
  transition: var(--transition);
}

.pkg-card.selected .pkg-check {
  border-color: var(--gold);
  background: var(--gold);
}

.pkg-card.selected .pkg-check svg {
  stroke: var(--navy);
}

.pkg-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--cream-2);
}

.pkg-banner {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--cream-2);
}

.pkg-info {
  flex: 1;
  min-width: 0;
}

.pkg-name {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 2px;
  line-height: 1.35;
}

.pkg-dur {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  margin-top: 4px;
}

.pkg-price-badge {
  text-align: right;
  flex-shrink: 0;
}

.pkg-price-val {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  line-height: 1.1;
}

.pkg-price-per {
  font-size: 10px;
  color: var(--text-light);
}

.pkg-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  background: var(--cream);
  border: none;
  border-top: 1px solid var(--cream-2);
  font-size: 12px;
  color: var(--text-mid);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

.pkg-toggle-left, .pkg-toggle-right {
  flex: 1;
}
.pkg-toggle-left {
  text-align: left;
}
.pkg-toggle-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.pkg-toggle-btn:hover {
  color: var(--gold);
  background: var(--gold-pale);
}

.pkg-toggle-btn svg {
  transition: var(--transition);
}

.pkg-toggle-btn.open svg {
  transform: rotate(180deg);
}

.pkg-detail-wrap {
  padding: 10px 14px 12px;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
  border-top: 1px solid var(--cream-2);
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Özel Paket Kartı ────────────────────────────────────── */
.pkg-custom {
  border: 2px dashed rgba(156, 114, 19, .4);
  background: linear-gradient(135deg, #ffffff 0%, #fff9fc 100%);
}

.pkg-custom.selected {
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, #fffafd 0%, #fff0f6 100%);
}

.custom-price-badge .pkg-price-val {
  font-size: 15px;
}

/* Hizmet Seçim Alanı */
.custom-items-wrap {
  padding: 4px 8px 12px;
  border-top: 1px dashed rgba(156, 114, 19, .3);
}

.custom-items-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 10px;
  padding-top: 10px;
}

.custom-services-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}

.custom-service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.custom-service-row:last-child {
  border-bottom: none;
}

.custom-service-row:hover {
  background: var(--gold-pale);
}

.custom-service-row.active {
  background: rgba(74, 18, 84, 0.05);
}

.service-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-service-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--cream-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  accent-color: var(--gold);
}

.service-icon {
  font-size: 14px;
}

.service-name {
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
}

.service-price {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
}

.custom-service-row.active .service-name {
  font-weight: 600;
}

.custom-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  animation: fadeIn .25s ease;
}

.custom-total-label {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
}

.custom-total-val {
  font-size: 16px;
  font-weight: 500;
  color: var(--gold);
  font-family: 'Poppins', sans-serif;
}

/* ── Sticky Bottom Bar ───────────────────────────────────── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -4px 24px rgba(13, 27, 62, .12);
  border-top: 1px solid var(--cream-2);
  z-index: 90;
}

.bottom-total {
  display: flex;
  flex-direction: column;
  min-width: 90px;
}

.bottom-total-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}

.bottom-total-val {
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

/* ── Flatpickr ───────────────────────────────────────────── */
.flatpickr-wrapper {
  display: block !important;
  width: 100% !important;
}

.flatpickr-calendar {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--cream-2) !important;
  font-family: 'Poppins', sans-serif !important;
}

/* Month and Year: 13px 400 */
.flatpickr-current-month,
.flatpickr-current-month .cur-month,
.flatpickr-current-month input.cur-year {
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Weekday headers: 12px 400 */
.flatpickr-weekdays,
span.flatpickr-weekday {
  font-size: 12px !important;
  font-weight: 400 !important;
}

/* Days: 13px 400 */
.flatpickr-day {
  font-size: 13px !important;
  font-weight: 400 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy) !important;
}

.flatpickr-day:hover {
  background: var(--gold-pale) !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (min-width: 600px) {
  .app-main {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .bottom-bar {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .app-header {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

@media (max-width: 360px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .pkg-card-inner {
    padding: 12px 10px;
  }

  .lang-pill span {
    display: none;
  }
}

/* ── Spinner ─────────────────────────────────────────────── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── Kart giriş animasyonu ───────────────────────────────── */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.form-section {
  animation: slideUp .35s ease both;
}

.form-section:nth-child(1) {
  animation-delay: .05s;
}

.form-section:nth-child(2) {
  animation-delay: .12s;
}

.form-section:nth-child(3) {
  animation-delay: .20s;
}

/* ── Wizard Elemanları (Progress, Back Btn, Primary Btn) ── */
.progress-indicator-bar {
  position: fixed;
  top: var(--app-header);
  left: 0;
  right: 0;
  height: 3px;
  background: #e0e0e0;
  z-index: 101;
  overflow: hidden;
}

@media (min-width: 480px) {
  .progress-indicator-bar {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
}

.progress-indicator-fill {
  height: 100%;
  width: 33.33%;
  background: var(--navy);
  transition: width var(--transition);
}

.header-back-btn {
  background: none;
  border: none;
  padding: 6px;
  margin-left: -6px;
  cursor: pointer;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.header-back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(74, 18, 84, 0.2);
  letter-spacing: .3px;
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 6px 18px rgba(74, 18, 84, 0.3);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary.loading {
  opacity: .75;
  pointer-events: none;
}

/* ── Step 1 Row Input & Wrap Styles ─────────────────────── */
.input-wrap-right {
  position: relative;
  width: 120px;
}

.app-input-row {
  width: 120px;
  height: 38px;
  padding: 0 10px;
  text-align: center;
  background: var(--cream);
  border: 1.5px solid var(--cream-2);
  border-radius: var(--radius-sm);
  font-size: 13px !important;
  font-weight: 400 !important;
  font-family: 'Poppins', sans-serif !important;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

.app-input-row:focus {
  border-color: var(--gold);
  background: var(--white);
}

.app-input-row[readonly] {
  color: var(--text) !important;
  opacity: 1 !important;
  background-color: var(--white) !important;
}

.input-wrap-right .field-err {
  font-size: 11px;
  color: var(--error);
  white-space: nowrap;
  margin-top: 4px;
  text-align: right;
  display: none;
}
.input-wrap-right .field-err.show {
  display: block;
}

/* ── Step 1 Tamamı 13px 400 ─────────────────────────────── */
#stepSection1 .field-label {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--text) !important;
  font-family: 'Poppins', sans-serif !important;
}

#stepSection1 .counter-btn,
#stepSection1 .counter-num,
#stepSection1 .app-input-row {
  font-size: 13px !important;
  font-weight: 400 !important;
  font-family: 'Poppins', sans-serif !important;
}

/* ── Mobil Dil Seçici Modali & Backdrop ──────────────────── */
.backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
  display: none;
  backdrop-filter: blur(2px);
  transition: var(--transition);
}

.backdrop.open {
  display: block;
}

/* ── Step 1 Centering Styles ────────────────────────────── */
body.step-1 .app-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: calc(100vh - var(--app-header) - var(--bottom-bar));
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.step-1 #bookingForm {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

body.step-1 #stepSection1 {
  margin: 15px auto !important;
  width: calc(100% - 24px) !important;
  max-width: 500px !important;
  transform: translateY(-20px);
}

.step1-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--cream-2);
  font-weight: 500;
}

/* Hide the 100px spacer on Step 1 so it doesn't push the card up */
body.step-1 .app-main div[style*="height:100px"] {
  display: none !important;
}

@media (max-width: 420px) {
  .app-header {
    padding: 0 12px;
  }
  .app-page-title {
    font-size: 12px;
  }
  .lang-dropdown-btn {
    padding: 6px 8px;
    gap: 4px;
  }
  .lang-btn-code {
    font-size: 11px;
  }
}








