/* ============================================================
   FILE: customer.css
   PROJECT: CleaningMarketplace.Web
   PURPOSE: Complete customer portal design system. Covers booking
            wizard, dashboard, booking cards, review widget, profile
            sections, GDPR rights, and mobile navigation.
            Extends tydfy.css — load AFTER tydfy.css.
   LAST MODIFIED: 30 May 2026
   ============================================================ */

/* ── Booking Wizard Step Indicator ────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  padding: 0 8px;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 120px;
}
.wizard-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: 2px solid #E2E8F0;
  background: #F8FAFC;
  color: #6B7280;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  position: relative;
  z-index: 2;
}
.wizard-step.active .wizard-step-circle {
  background: #1E88FF;
  border-color: #1E88FF;
  color: white;
}
.wizard-step.completed .wizard-step-circle {
  background: #10B981;
  border-color: #10B981;
  color: white;
}
.wizard-step-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
}
.wizard-step.active .wizard-step-label { color: #1E88FF; font-weight: 700; }
.wizard-step.completed .wizard-step-label { color: #10B981; }
.wizard-connector {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin-bottom: 22px;
  transition: background 0.2s;
}
.wizard-connector.done { background: #10B981; }

@media (max-width: 575.98px) {
  .wizard-step-label { display: none; }
  .wizard-step-icon { display: block; font-size: 14px; }
  .wizard-step-circle { width: 36px; height: 36px; font-size: 14px; }
  .wizard-steps { margin-bottom: 20px; }
}

/* ── Duration Cards ────────────────────────────────────────────────────────── */
.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.duration-card {
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: white;
  text-align: center;
  position: relative;
  outline: none;
}
.duration-card:hover {
  border-color: #93C5FD;
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}
.duration-card.selected {
  border-color: #1E88FF;
  background: #EFF6FF;
  box-shadow: 0 4px 16px rgba(37,99,235,0.18);
}
.duration-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: #1E88FF;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.duration-hours {
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.duration-price {
  font-size: 32px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1;
  margin-bottom: 2px;
}
.duration-price-sub {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 12px;
}
.duration-includes {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: 12px;
  color: #374151;
}
.duration-includes li {
  padding: 2px 0;
}
.duration-includes li::before {
  content: '✓ ';
  color: #10B981;
  font-weight: 700;
}
.duration-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #1E88FF;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

@media (max-width: 767.98px) {
  .duration-grid { grid-template-columns: 1fr; gap: 12px; }
  .duration-price { font-size: 28px; }
}

/* ── Time Slot Grid ────────────────────────────────────────────────────────── */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.time-slot {
  padding: 10px 6px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  background: white;
  color: #374151;
  transition: all 0.12s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.time-slot:hover:not(.unavailable) {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #1E88FF;
}
.time-slot.selected {
  background: #1E88FF;
  border-color: #1E88FF;
  color: white;
}
.time-slot.unavailable {
  background: #F8FAFC;
  color: #9CA3AF;
  cursor: not-allowed;
  border-color: #F1F5F9;
  text-decoration: line-through;
}

@media (max-width: 575.98px) {
  .time-slots-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Skeleton loader for time slots ────────────────────────────────────────── */
.time-slot-skeleton {
  height: 44px;
  border-radius: 8px;
  animation: shimmer 1.5s infinite;
  background: linear-gradient(90deg, #F1F5F9 25%, #E8EDF2 50%, #F1F5F9 75%);
  background-size: 200% 100%;
}

/* ── Calendar Date Picker ─────────────────────────────────────────────────── */
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.date-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.12s;
  min-height: 36px;
}
.date-cell:hover:not(.disabled):not(.past) {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #1E88FF;
}
.date-cell.selected {
  background: #1E88FF;
  color: white;
  border-color: #1E88FF;
  font-weight: 700;
}
.date-cell.today { border-color: #10B981; color: #10B981; font-weight: 700; }
.date-cell.today.selected { background: #1E88FF; color: white; border-color: #1E88FF; }
.date-cell.past, .date-cell.disabled {
  color: #D1D5DB;
  cursor: not-allowed;
  background: transparent;
}

/* ── Cancellation Policy Box (CMA 2025 — mandatory) ─────────────────────── */
.cancellation-policy-box {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.cancellation-policy-box .policy-title {
  font-weight: 700;
  color: #92400E;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cancellation-policy-box .policy-text { color: #78350F; line-height: 1.5; }

/* ── Order Summary Card ───────────────────────────────────────────────────── */
.order-summary {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.order-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #374151;
  padding: 5px 0;
}
.order-row .label { color: #6B7280; }
.order-row .value { font-weight: 600; color: #1E293B; }
.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #E2E8F0;
  font-weight: 700;
}
.order-total .label { font-size: 15px; color: #1E293B; }
.order-total .value { font-size: 20px; color: #1E88FF; }

@media (min-width: 992px) {
  .order-summary-sticky { position: sticky; top: 100px; }
}

/* ── Booking Confirmation Success ─────────────────────────────────────────── */
.booking-confirmed-hero {
  text-align: center;
  padding: 48px 24px 32px;
}
.confirmed-checkmark {
  font-size: 72px;
  margin-bottom: 16px;
  display: block;
  animation: bounceIn 0.6s ease;
}
@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.1); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1);   opacity: 1; }
}
.confirmed-title {
  font-size: 28px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 6px;
}
.confirmed-ref {
  font-size: 16px;
  color: #6B7280;
  margin-bottom: 0;
}
.confirmed-ref strong {
  color: #1E88FF;
  font-family: monospace;
  font-size: 18px;
}
.what-next-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.what-next-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F8FAFC;
  border-radius: 10px;
  font-size: 14px;
  color: #374151;
}
.what-next-num {
  width: 28px;
  height: 28px;
  background: #1E88FF;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Dashboard Greeting ───────────────────────────────────────────────────── */
.dashboard-greeting {
  padding: 24px 0 8px;
}
.dashboard-greeting h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}
.dashboard-greeting .subtitle { font-size: 14px; color: #6B7280; }

/* ── Booking Cards ────────────────────────────────────────────────────────── */
.booking-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  transition: box-shadow 0.15s;
}
.booking-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.booking-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.booking-card-date {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
}
.booking-card-body { padding: 14px 18px; }
.booking-card-footer {
  padding: 10px 18px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.booking-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: #374151;
}
.booking-detail-row .key { color: #6B7280; }
.booking-detail-row .val { font-weight: 600; color: #1E293B; }

/* Upcoming card left accent */
.booking-card.upcoming { border-left: 4px solid #1E88FF; }
.booking-card.inprogress { border-left: 4px solid #10B981; }
.booking-card.completed { border-left: 4px solid #6B7280; }

/* ── Status Timeline ──────────────────────────────────────────────────────── */
.status-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 16px 0;
  overflow-x: auto;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
}
.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #F1F5F9;
  color: #6B7280;
  border: 2px solid #E2E8F0;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.timeline-dot.done {
  background: #10B981;
  border-color: #10B981;
  color: white;
}
.timeline-dot.current {
  background: #1E88FF;
  border-color: #1E88FF;
  color: white;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}
.timeline-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  margin-top: 6px;
  text-align: center;
  line-height: 1.3;
}
.timeline-label.done { color: #10B981; }
.timeline-label.current { color: #1E88FF; font-weight: 700; }
.timeline-connector {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin-top: 15px;
}
.timeline-connector.done { background: #10B981; }

/* ── Interactive Star Rating Widget ──────────────────────────────────────── */
.star-rating {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  font-size: 28px;
  color: #D1D5DB;
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
}
.star-btn:hover, .star-btn.active { color: #F59E0B; transform: scale(1.15); }
.star-btn.filled { color: #F59E0B; }
.star-rating-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin-left: 4px;
  margin-bottom: 12px;
  display: block;
}

/* ── Cancellation Modal ───────────────────────────────────────────────────── */
.cancel-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cancel-modal {
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.cancel-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 18px;
  font-weight: 700;
  color: #1E293B;
}
.cancel-modal-body { padding: 20px 24px; }
.cancel-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Refund amount display ────────────────────────────────────────────────── */
.refund-box {
  background: #F0FDF4;
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 14px;
}
.refund-box.warning {
  background: #FFFBEB;
  border-color: #FDE68A;
}
.refund-box.no-refund {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}

/* ── Profile Form Sections ────────────────────────────────────────────────── */
.profile-section {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}
.profile-section-header {
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-section-body { padding: 20px; }
.profile-danger-zone {
  border-color: #FECACA;
}
.profile-danger-zone .profile-section-header {
  background: #FEF2F2;
  color: #991B1B;
}

/* ── GDPR Rights Cards ────────────────────────────────────────────────────── */
.gdpr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.gdpr-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.gdpr-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}
.gdpr-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 6px;
}
.gdpr-card-text {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Customer Mobile Navigation ───────────────────────────────────────────── */
.customer-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #E2E8F0;
  z-index: 100;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.customer-bottom-nav-items {
  display: flex;
  justify-content: space-around;
}
.customer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  text-decoration: none;
  color: #6B7280;
  font-size: 10px;
  font-weight: 600;
  min-width: 56px;
  border-radius: 8px;
  transition: color 0.1s;
}
.customer-nav-item .nav-icon { font-size: 22px; }
.customer-nav-item.active { color: #1E88FF; }
.customer-nav-item:hover { color: #1E88FF; text-decoration: none; }

/* ── Floating Book Button (mobile) ────────────────────────────────────────── */
.float-book-btn {
  display: none;
  position: fixed;
  bottom: 72px;
  right: 16px;
  z-index: 90;
  background: #1E88FF;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 16px rgba(37,99,235,0.45);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s;
}
.float-book-btn:hover { transform: translateY(-2px); color: white; text-decoration: none; }

@media (max-width: 767.98px) {
  .customer-bottom-nav { display: block; }
  .float-book-btn { display: flex; }
  /* Add bottom padding so content doesn't hide behind nav */
  .customer-page-content { padding-bottom: 80px !important; }
}

/* ── Customer Dashboard Top Navbar ────────────────────────────────────────── */
.customer-topnav {
  background: white;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.customer-topnav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1E88FF;
  font-weight: 700;
  font-size: 16px;
}
.customer-topnav-brand img { border-radius: 6px; }
.customer-topnav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.customer-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 50px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 0.1s;
}
.customer-profile-btn:hover { background: #EFF6FF; text-decoration: none; color: #1E88FF; }

/* ── Stripe payment form ──────────────────────────────────────────────────── */
.stripe-element-container {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 48px;
}
.stripe-element-container.focused {
  border-color: #1E88FF;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.stripe-error {
  color: #EF4444;
  font-size: 13px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7280;
  margin-top: 12px;
  padding: 8px;
  background: #F8FAFC;
  border-radius: 8px;
}

/* ── Trust signals row ────────────────────────────────────────────────────── */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: #6B7280;
}
.trust-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Empty states (customer) ─────────────────────────────────────────────── */
.customer-empty {
  text-align: center;
  padding: 56px 24px;
}
.customer-empty-icon { font-size: 56px; margin-bottom: 16px; display: block; }
.customer-empty h3 { font-size: 20px; font-weight: 700; color: #1E293B; margin-bottom: 8px; }
.customer-empty p { font-size: 15px; color: #6B7280; max-width: 320px; margin: 0 auto 20px; }

/* ── Loading button state ─────────────────────────────────────────────────── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.btn-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Customer toast notifications ────────────────────────────────────────── */
.customer-toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.customer-toast {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: toastSlide 0.25s ease;
  pointer-events: auto;
  font-family: 'Inter', sans-serif;
}
@keyframes toastSlide {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.customer-toast.success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.customer-toast.error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.customer-toast.info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1565C0; }

/* ── Password strength bar ────────────────────────────────────────────────── */
.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: #E2E8F0;
  margin-top: 6px;
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.password-strength-label {
  font-size: 11px;
  margin-top: 3px;
  font-weight: 600;
}

/* ── Show/hide password toggle ────────────────────────────────────────────── */
.password-field-wrap {
  position: relative;
}
.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6B7280;
  font-size: 16px;
  padding: 4px;
  display: flex;
  align-items: center;
}
.password-toggle-btn:hover { color: #374151; }
