/* BarberHub Client Booking Portal Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #070708;
  --bg-secondary: #0f0f12;
  --bg-tertiary: #15151a;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --error: #ef4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

/* Main Container */
main {
  flex: 1;
  width: min(800px, calc(100% - 32px));
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Glassmorphic Panel */
.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Stepper Progress Bar */
.stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  text-align: center;
}

.stepper-step.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 15px var(--accent-glow);
}

.stepper-step.active .step-label {
  color: var(--text-primary);
}

.stepper-step.completed .step-num {
  background: var(--success);
  border-color: var(--success);
  color: var(--text-primary);
}

.stepper-step.completed .step-label {
  color: var(--success);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Service Card Design */
.card-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.card-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card-item.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

/* Barber Card Design */
.barber-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px;
}

.barber-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  border: 2px solid var(--border);
  margin-bottom: 14px;
  transition: var(--transition);
}

.barber-card:hover .barber-avatar {
  border-color: var(--accent);
  transform: scale(1.05);
}

.barber-card.selected .barber-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.barber-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
}

.barber-position {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Date & Time Selector styling */
.datetime-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .datetime-container {
    grid-template-columns: 1fr;
  }
}

.calendar-section, .slots-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.date-picker-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 14px 16px;
  outline: none;
  font-size: 1rem;
  cursor: pointer;
  color-scheme: dark;
  transition: var(--transition);
  width: 100%;
}

.date-picker-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Availability slot chips */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.slot-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.slot-chip:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
}

.slot-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.no-slots-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 40px 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* Contact Info Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 14px 16px;
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Button Navigation Group */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 16px;
}

.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--text-secondary);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* Success Confirmation Panel */
.success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-glow);
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.booking-summary-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  width: 100%;
  max-width: 480px;
  margin: 24px 0;
  text-align: left;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.summary-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.summary-value {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Barber Shop Listing Grid */
.shop-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: var(--transition);
}

.shop-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shop-logo-large {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
}

.shop-info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.shop-address {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.shop-address:hover {
  color: var(--accent);
  text-decoration: underline;
}

.shop-phone-link {
  font-size: 0.85rem;
  color: var(--text-secondary) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: var(--transition);
  cursor: pointer;
}

.shop-phone-link:hover {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

.shop-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 16px;
}

.shop-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Collapsible Details & Summary Styling */
summary::-webkit-details-marker {
  display: none !important;
}

summary {
  list-style: none !important;
}

details[open] .chevron-icon {
  transform: rotate(180deg);
}
