/* Hair Clinic Appointments – Frontend Styles */

:root {
  --hca-primary:     #1a6b4a;
  --hca-primary-dk:  #145239;
  --hca-accent:      #f0a500;
  --hca-bg:          #ffffff;
  --hca-border:      #e0e0e0;
  --hca-text:        #222222;
  --hca-muted:       #6b7280;
  --hca-error:       #cc2200;
  --hca-success:     #1a6b4a;
  --hca-radius:      10px;
  --hca-shadow:      0 2px 18px rgba(0,0,0,.08);
}

/* ── Wrap ──────────────────────────────────────────── */
.hca-wrap {
  max-width: 560px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--hca-text);
}

/* ── Step ──────────────────────────────────────────── */
.hca-step {
  background: var(--hca-bg);
  border: 1px solid var(--hca-border);
  border-radius: var(--hca-radius);
  box-shadow: var(--hca-shadow);
  margin-bottom: 16px;
  overflow: hidden;
  display: none;
}
.hca-step.hca-active { display: block; }

.hca-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--hca-primary);
  color: #fff;
  padding: 14px 20px;
}
.hca-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.hca-step-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}

.hca-step-body { padding: 22px 24px; }

/* ── Date picker ────────────────────────────────────── */
.hca-date-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--hca-border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 14px;
  box-sizing: border-box;
  transition: border-color .2s;
}
.hca-date-input:focus { border-color: var(--hca-primary); outline: none; }

/* ── Buttons ─────────────────────────────────────────── */
.hca-btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .18s, opacity .18s;
}
.hca-btn-primary {
  background: var(--hca-primary);
  color: #fff;
}
.hca-btn-primary:hover { background: var(--hca-primary-dk); }
.hca-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.hca-btn-secondary {
  background: #f3f4f6;
  color: var(--hca-text);
}
.hca-btn-secondary:hover { background: #e5e7eb; }
.hca-btn-pay {
  background: var(--hca-accent);
  color: #fff;
}
.hca-btn-pay:hover { background: #d49300; }

.hca-btns-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 10px;
}

/* ── Slots grid ─────────────────────────────────────── */
.hca-slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 18px;
}
.hca-slot-btn {
  padding: 14px 10px;
  border: 2px solid var(--hca-border);
  border-radius: 8px;
  background: #f9fafb;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
}
.hca-slot-btn:hover:not(.hca-slot-taken) {
  border-color: var(--hca-primary);
  background: #e8f3ef;
  color: var(--hca-primary);
}
.hca-slot-btn.hca-slot-selected {
  border-color: var(--hca-primary);
  background: var(--hca-primary);
  color: #fff;
}
.hca-slot-btn.hca-slot-taken {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
  color: var(--hca-muted);
}

/* ── Form fields ─────────────────────────────────────── */
.hca-field-group {
  margin-bottom: 15px;
}
.hca-field-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--hca-text);
}
.hca-req { color: var(--hca-error); }

.hca-field-group input,
.hca-field-group textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--hca-border);
  border-radius: 8px;
  font-size: .95rem;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color .2s;
}
.hca-field-group input:focus,
.hca-field-group textarea:focus {
  border-color: var(--hca-primary);
  outline: none;
}

/* ── Fee box ─────────────────────────────────────────── */
.hca-fee-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f7f4;
  border: 1.5px solid #c0ddd2;
  border-radius: 8px;
  padding: 12px 18px;
  margin: 18px 0 4px;
  font-size: .95rem;
}
.hca-fee-box strong { font-size: 1.25rem; color: var(--hca-primary); }

/* ── Summary ─────────────────────────────────────────── */
.hca-selected-date-label,
.hca-booking-summary {
  font-size: .88rem;
  color: var(--hca-muted);
  background: #f9fafb;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 14px;
}

/* ── Error ───────────────────────────────────────────── */
.hca-error {
  color: var(--hca-error);
  font-size: .88rem;
  background: #fff0ee;
  border: 1px solid #f5c0b8;
  border-radius: 6px;
  padding: 9px 13px;
  margin: 10px 0;
}

/* ── Loader ──────────────────────────────────────────── */
.hca-loader {
  text-align: center;
  padding: 20px;
  color: var(--hca-muted);
  font-size: .9rem;
}
.hca-loader::after {
  content: '';
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--hca-border);
  border-top-color: var(--hca-primary);
  border-radius: 50%;
  animation: hca-spin .6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes hca-spin { to { transform: rotate(360deg); } }

/* ── Success ─────────────────────────────────────────── */
.hca-step-success {
  text-align: center;
  padding: 40px 28px;
  border: 2px solid #c0ddd2;
}
.hca-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--hca-primary);
  color: #fff;
  font-size: 2rem;
  line-height: 64px;
  margin: 0 auto 18px;
}
.hca-step-success h2 {
  color: var(--hca-primary);
  margin: 0 0 16px;
}
.hca-confirmation-details {
  background: #f0f7f4;
  border-radius: 8px;
  padding: 16px 22px;
  text-align: left;
  display: inline-block;
  font-size: .95rem;
  line-height: 1.7;
}
.hca-success-note {
  font-size: .85rem;
  color: var(--hca-muted);
  margin-top: 14px;
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .hca-slots-grid { grid-template-columns: 1fr; }
  .hca-step-body  { padding: 18px 16px; }
  .hca-btns-row   { flex-direction: column-reverse; }
  .hca-btn        { width: 100%; text-align: center; }
}
