/* ==========================================================================
   MANGALYA BEAUTY PARLOUR - CUSTOMER PORTAL STYLES
   ========================================================================== */

body.customer-body {
  background-color: hsl(38, 25%, 95%);
  color: var(--rosewood-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Auth Gate Screen --- */
.customer-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at top, hsl(38, 70%, 93%) 0%, hsl(340, 25%, 92%) 100%);
}

.customer-auth-card {
  max-width: 460px;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-medium);
  text-align: center;
}

.customer-auth-header {
  margin-bottom: 1.5rem;
}

.customer-auth-logo-img {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-400);
  box-shadow: var(--shadow-gold);
  display: block;
}

.customer-auth-title {
  font-size: 1.5rem;
  color: var(--rosewood-900);
  margin-bottom: 0.2rem;
}

.customer-auth-subtitle {
  font-size: var(--text-xs);
  color: var(--rosewood-600);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* Auth Tabs */
.customer-auth-tabs {
  display: flex;
  background: var(--bg-surface-warm);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-medium);
}

.customer-auth-tab-btn {
  flex: 1;
  padding: 0.55rem 0.4rem;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--rosewood-700);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.customer-auth-tab-btn.active {
  background: var(--rosewood-900);
  color: var(--gold-300);
  box-shadow: var(--shadow-xs);
}

.customer-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  margin-bottom: 1rem;
  display: none;
  text-align: left;
}

.customer-alert.is-visible {
  display: block;
}

.customer-alert-error {
  background: hsla(0, 80%, 60%, 0.1);
  color: hsl(0, 70%, 45%);
  border: 1px solid hsla(0, 80%, 60%, 0.3);
}

.customer-alert-success {
  background: hsla(145, 65%, 40%, 0.1);
  color: var(--success-green);
  border: 1px solid hsla(145, 65%, 40%, 0.3);
}

/* --- Customer Dashboard --- */
.customer-dashboard-wrapper {
  display: none;
  flex-direction: column;
  flex-grow: 1;
}

.customer-navbar {
  background: linear-gradient(135deg, hsl(340, 50%, 12%) 0%, hsl(340, 35%, 8%) 100%);
  color: #ffffff;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(212, 160, 60, 0.3);
}

.customer-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.customer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.customer-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: #ffffff;
  line-height: 1.1;
}

.customer-sub-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 50;
}

.customer-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.45rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.customer-tabs::-webkit-scrollbar {
  display: none;
}

.customer-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.55rem 0.95rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rosewood-700);
  cursor: pointer;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.customer-tab-btn:hover {
  background: var(--bg-surface-warm);
  color: var(--rosewood-900);
  border-color: var(--border-medium);
}

.customer-tab-btn.active {
  background: var(--rosewood-900);
  color: var(--gold-300);
  border-color: var(--rosewood-900);
  box-shadow: var(--shadow-xs);
}

.customer-content-section {
  display: none;
  padding: 2rem 0;
}

.customer-content-section.active {
  display: block;
}

/* Booking Cards */
.booking-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.booking-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.status-confirmed {
  background: hsla(145, 65%, 40%, 0.15);
  color: var(--success-green);
}

.status-rescheduled {
  background: hsla(38, 75%, 68%, 0.25);
  color: var(--gold-700);
}

.status-cancelled {
  background: hsla(0, 0%, 50%, 0.15);
  color: #777;
}

.booking-card-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .booking-card-body {
    grid-template-columns: 1fr;
  }
}

.booking-action-bar {
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  flex-wrap: wrap;
}

/* Packages Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Offers Grid */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.offer-card-item {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.offer-card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-700);
  background: var(--gold-100);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.offer-promo-box {
  background: var(--bg-surface-warm);
  border: 1px dashed var(--gold-400);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.offer-promo-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--rosewood-600);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.offer-promo-code-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.offer-promo-code {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-700);
  letter-spacing: 1px;
}

.offer-expiry-text {
  font-size: 11px;
  color: var(--rosewood-600);
  margin-top: 0.25rem;
}

/* Reschedule Slots Grid */
.slots-container-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.slot-pick-btn {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  color: var(--rosewood-800);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.slot-pick-btn:hover:not(:disabled) {
  background: var(--gold-100);
  border-color: var(--gold-400);
  color: var(--rosewood-900);
}

.slot-pick-btn.selected {
  background: var(--rosewood-900);
  color: var(--gold-300);
  border-color: var(--rosewood-900);
}

.slot-pick-btn.booked,
.slot-pick-btn:disabled {
  background: hsl(0, 0%, 94%);
  color: #999;
  border-color: #ddd;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* --- Mobile & Tablet Responsive Optimizations --- */
@media (max-width: 991px) {
  .customer-navbar-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .packages-grid,
  .offers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .package-builder-wrapper {
    grid-template-columns: 1fr;
  }

  .builder-main {
    padding: 1.5rem 1.25rem;
  }

  .builder-sidebar {
    border-left: none;
    border-top: 1.5px solid var(--border-medium);
    padding: 1.5rem 1.25rem;
  }
}

/* Responsive visibility utilities */
.hide-mobile-tablet {
  display: flex !important;
}
.show-mobile-tablet {
  display: none !important;
}

.customer-mobile-nav-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0;
  box-sizing: border-box;
}

.customer-mobile-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--rosewood-900);
  white-space: nowrap;
  flex-shrink: 0;
}

.customer-dropdown-box {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.customer-mobile-select {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gold-400);
  background: #ffffff;
  color: var(--rosewood-900);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  outline: none;
}

.customer-mobile-select:focus {
  border-color: var(--rosewood-900);
  box-shadow: 0 0 0 2px hsla(38, 75%, 68%, 0.4);
}

@media (max-width: 768px) {
  .hide-mobile-tablet {
    display: none !important;
  }

  .show-mobile-tablet {
    display: flex !important;
  }

  html, body, .customer-body {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
  }

  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .customer-navbar {
    padding: 0.5rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .customer-navbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    box-sizing: border-box;
  }

  .customer-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .customer-navbar-inner > div:last-child {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
  }

  .customer-navbar-inner > div:last-child::-webkit-scrollbar {
    display: none;
  }

  .customer-sub-header {
    width: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0;
  }

  .customer-auth-wrapper {
    padding: 1rem;
  }

  .customer-auth-card {
    padding: 1.5rem 1.15rem;
    max-width: calc(100vw - 20px);
    width: 100%;
    box-sizing: border-box;
  }

  .booking-card {
    padding: 1.15rem 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .booking-action-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .booking-action-bar .btn {
    width: 100%;
    justify-content: center;
  }

  .booking-action-bar .btn-whatsapp {
    margin-left: 0 !important;
  }

  .packages-grid,
  .offers-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    width: 100%;
    box-sizing: border-box;
  }

  .builder-main {
    padding: 1.15rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }

  .builder-options-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
  }

  .builder-option-card {
    padding: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .slots-container-wrap {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .customer-brand-title {
    font-size: 0.95rem;
  }

  .customer-auth-card {
    padding: 1.25rem 0.85rem;
  }
}
