/* =========================================================
   Hammerwave Booking – Frontend Form Styles
   ========================================================= */

:root {
  --hw-primary:   #7B5CF6;
  --hw-primary-d: #6D3EF5;
  --hw-success:   #10B981;
  --hw-danger:    #EF4444;
  --hw-border:    #E5E7EB;
  --hw-bg:        #F9FAFB;
  --hw-text:      #111827;
  --hw-muted:     #6B7280;
  --hw-radius:    12px;
  --hw-shadow:    0 2px 12px rgba(0,0,0,.08);
}

/* ---- Wrapper ---- */
.hw-booking {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--hw-text);
  max-width: 760px;
  margin: 0 auto;
}

/* ---- Step indicator ---- */
.hw-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  gap: 0;
  flex-wrap: wrap;
}
.hw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  gap: 6px;
  flex: 1;
  min-width: 60px;
}
.hw-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 55%;
  width: 90%;
  height: 2px;
  background: var(--hw-border);
  z-index: 0;
}
.hw-step--done:not(:last-child)::after { background: var(--hw-primary); }
.hw-step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--hw-border);
  color: var(--hw-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  position: relative; z-index: 1;
  transition: all .2s;
}
.hw-step--active .hw-step-circle { background: var(--hw-primary); color: #fff; box-shadow: 0 0 0 4px rgba(123,92,246,.2); }
.hw-step--done   .hw-step-circle { background: var(--hw-primary); color: #fff; }
.hw-step-label { font-size: 11px; color: var(--hw-muted); font-weight: 600; text-align: center; }
.hw-step--active .hw-step-label, .hw-step--done .hw-step-label { color: var(--hw-primary); }

/* ---- Panel ---- */
.hw-panel {
  background: #fff;
  border-radius: var(--hw-radius);
  box-shadow: var(--hw-shadow);
  border: 1px solid var(--hw-border);
  padding: 28px;
}
.hw-panel-title {
  font-size: 20px; font-weight: 700;
  margin: 0 0 20px;
  color: var(--hw-text);
}
.hw-subtitle { color: var(--hw-muted); margin: -12px 0 16px; font-size: 13px; }

/* ---- Loading ---- */
.hw-loading { text-align: center; padding: 48px; color: var(--hw-muted); }
.hw-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--hw-border);
  border-top-color: var(--hw-primary);
  border-radius: 50%;
  animation: hw-spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes hw-spin { to { transform: rotate(360deg); } }

/* ---- Category chips ---- */
.hw-cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hw-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--hw-border);
  background: transparent;
  font-size: 12px; font-weight: 600;
  cursor: pointer; color: var(--hw-muted);
  transition: all .15s;
}
.hw-chip:hover { border-color: var(--hw-primary); color: var(--hw-primary); }
.hw-chip--active { background: var(--hw-primary); color: #fff; border-color: var(--hw-primary); }

/* ---- Service cards ---- */
.hw-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.hw-service-card {
  border: 2px solid var(--hw-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all .18s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.hw-service-card:hover { border-color: var(--svc-color, var(--hw-primary)); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.hw-service-card--selected { border-color: var(--svc-color, var(--hw-primary)); box-shadow: 0 0 0 3px rgba(123,92,246,.15); }
.hw-svc-color-bar { height: 4px; background: var(--svc-color, var(--hw-primary)); }
.hw-svc-body { padding: 14px; flex: 1; }
.hw-svc-name { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.hw-svc-desc { font-size: 12px; color: var(--hw-muted); margin: 0 0 10px; line-height: 1.4; }
.hw-svc-meta { display: flex; justify-content: space-between; align-items: center; }
.hw-svc-duration { font-size: 11px; color: var(--hw-muted); }
.hw-svc-price { font-size: 14px; font-weight: 800; color: var(--hw-primary); }
.hw-svc-check {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px;
  background: var(--hw-primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* ---- Staff list ---- */
.hw-staff-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.hw-staff-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--hw-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.hw-staff-option:hover, .hw-staff-option--selected { border-color: var(--hw-primary); }
.hw-staff-option--selected { background: #F5F3FF; }
.hw-staff-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hw-primary), #A78BFA);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hw-staff-avatar--any { background: linear-gradient(135deg, #9CA3AF, #D1D5DB); }
.hw-staff-text { flex: 1; }
.hw-staff-text strong { display: block; font-size: 14px; }
.hw-staff-text small  { color: var(--hw-muted); font-size: 12px; }
.hw-check {
  width: 24px; height: 24px;
  background: var(--hw-primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* ---- Calendar ---- */
.hw-calendar { max-width: 380px; margin: 0 auto 24px; }
.hw-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hw-cal-nav {
  background: var(--hw-bg); border: 1.5px solid var(--hw-border);
  border-radius: 8px; width: 34px; height: 34px;
  font-size: 18px; cursor: pointer; color: var(--hw-text);
  display: flex; align-items: center; justify-content: center;
}
.hw-cal-nav:hover { border-color: var(--hw-primary); color: var(--hw-primary); }
.hw-cal-month { font-size: 15px; font-weight: 700; }
.hw-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hw-cal-day-name { text-align: center; font-size: 11px; font-weight: 600; color: var(--hw-muted); padding: 6px 0; }
.hw-cal-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.hw-cal-cell:hover:not(.hw-cal-cell--disabled):not(.hw-cal-cell--blank) {
  background: #EDE9FE; color: var(--hw-primary);
}
.hw-cal-cell--today { font-weight: 800; color: var(--hw-primary); }
.hw-cal-cell--disabled { color: #D1D5DB; cursor: not-allowed; text-decoration: line-through; }
.hw-cal-cell--selected { background: var(--hw-primary) !important; color: #fff !important; font-weight: 700; }
.hw-cal-cell--blank { cursor: default; }

/* ---- Time slots ---- */
.hw-slot-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.hw-slot {
  padding: 9px 18px;
  border: 2px solid var(--hw-border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--hw-text);
  transition: all .15s;
}
.hw-slot:hover { border-color: var(--hw-primary); color: var(--hw-primary); }
.hw-slot--selected { background: var(--hw-primary); color: #fff; border-color: var(--hw-primary); }

/* ---- Customer form ---- */
.hw-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.hw-field { display: flex; flex-direction: column; gap: 5px; }
.hw-field label { font-size: 12px; font-weight: 600; color: #374151; text-transform: uppercase; letter-spacing: .4px; }
.hw-field--full { grid-column: 1 / -1; }
.hw-input {
  padding: 10px 13px;
  border: 1.5px solid var(--hw-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--hw-text);
  background: #fff;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.hw-input:focus { outline: none; border-color: var(--hw-primary); box-shadow: 0 0 0 3px rgba(123,92,246,.12); }
.hw-textarea { resize: vertical; min-height: 80px; }
.hw-err { color: var(--hw-danger); font-size: 12px; }
.hw-err--center { text-align: center; margin-bottom: 12px; }

/* ---- Summary / Confirmation ---- */
.hw-summary { border: 1.5px solid var(--hw-border); border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.hw-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.hw-summary-row + .hw-summary-row { border-top: 1px solid var(--hw-border); }
.hw-summary-row--total { background: var(--hw-bg); font-weight: 700; }
.hw-summary-label { font-size: 13px; color: var(--hw-muted); }
.hw-summary-value { font-size: 14px; text-align: right; }
.hw-price { font-size: 18px; font-weight: 800; color: var(--hw-primary); }

/* ---- Panel footer / nav buttons ---- */
.hw-panel-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.hw-btn-next {
  padding: 11px 26px;
  background: var(--hw-primary);
  color: #fff;
  border: none; border-radius: 9px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.hw-btn-next:hover:not(:disabled) { background: var(--hw-primary-d); }
.hw-btn-next:disabled { opacity: .5; cursor: not-allowed; }
.hw-btn-back {
  padding: 10px 20px;
  background: transparent;
  color: var(--hw-muted);
  border: 1.5px solid var(--hw-border);
  border-radius: 9px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.hw-btn-back:hover { border-color: var(--hw-primary); color: var(--hw-primary); }
.hw-btn-book {
  padding: 12px 32px;
  background: var(--hw-primary);
  color: #fff;
  border: none; border-radius: 9px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s;
  width: 100%;
}
.hw-btn-book:hover:not(:disabled) { background: var(--hw-primary-d); }
.hw-btn-book:disabled { opacity: .6; cursor: not-allowed; }

/* ---- Success screen ---- */
.hw-panel--success { text-align: center; padding: 48px 28px; }
.hw-success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #D1FAE5;
  color: var(--hw-success);
  font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.hw-panel--success h2 { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.hw-panel--success p  { color: var(--hw-muted); margin-bottom: 24px; }
.hw-success-details { background: var(--hw-bg); border-radius: 10px; padding: 16px 20px; display: inline-block; text-align: left; min-width: 260px; font-size: 14px; line-height: 2; }

/* ---- Misc ---- */
.hw-empty-msg { text-align: center; color: var(--hw-muted); padding: 24px 0; }

@media (max-width: 560px) {
  .hw-panel { padding: 18px; }
  .hw-form-grid { grid-template-columns: 1fr; }
  .hw-service-grid { grid-template-columns: 1fr; }
  .hw-steps { gap: 4px; }
  .hw-step-label { display: none; }
  .hw-step:not(:last-child)::after { display: none; }
}
