/* ═══════════════════════════════════════════════════════════
   DEM HAARSTUDIO — APPOINTMENT BOOKING
   Premium salon aesthetic: charcoal + gold + cream
   ═══════════════════════════════════════════════════════════ */

:root {
    --ap-gold: #D4A0A0;
    --ap-gold-light: #E8C4C4;
    --ap-gold-dark: #B07878;
    --ap-charcoal: #1A1A1A;
    --ap-dark: #2A2A2A;
    --ap-cream: #FAF7F2;
    --ap-cream-dark: #F0EBE3;
    --ap-border: #E8E0D4;
    --ap-text: #1A1A1A;
    --ap-text-muted: #8C8377;
    --ap-radius: 14px;
    --ap-radius-sm: 8px;
    --ap-shadow: 0 8px 32px rgba(0,0,0,0.08);
    --ap-shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
    --ap-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.ap-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 28px;
}
.ap-progress-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--ap-border);
    transition: var(--ap-transition);
}
.ap-progress-dot.active {
    background: var(--ap-gold);
    box-shadow: 0 0 0 4px rgba(201,169,110,0.2);
    width: 12px; height: 12px;
}
.ap-progress-dot.done { background: var(--ap-gold-dark); }
.ap-progress-line {
    width: 32px; height: 2px;
    background: var(--ap-border);
    border-radius: 1px;
}
.ap-progress-line.done { background: var(--ap-gold); }

/* ─── STEP CARD ───────────────────────────────────────────── */
.ap-card {
    background: #fff;
    border-radius: var(--ap-radius);
    padding: 32px;
    box-shadow: var(--ap-shadow);
    border: 1px solid var(--ap-border);
}
.ap-step-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ap-gold);
    margin-bottom: 4px;
}
.ap-step-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ap-charcoal);
    letter-spacing: -0.3px;
    margin-bottom: 24px;
}

/* ─── CATEGORY PILLS (horizontal scroll) ──────────────────── */
.ap-cat-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.ap-cat-scroll::-webkit-scrollbar { display: none; }

.ap-cat-pill {
    flex-shrink: 0;
    padding: 8px 20px;
    border: 1.5px solid var(--ap-border);
    border-radius: 100px;
    background: #fff;
    color: var(--ap-text);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--ap-transition);
    white-space: nowrap;
    user-select: none;
}
.ap-cat-pill:hover { border-color: var(--ap-gold); color: var(--ap-gold); }
.ap-cat-pill.active {
    background: var(--ap-charcoal);
    color: #fff;
    border-color: var(--ap-charcoal);
}

/* ─── SERVICE LIST (scrollable container) ─────────────────── */
.ap-services-wrap {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--ap-gold-light) transparent;
}
.ap-services-wrap::-webkit-scrollbar { width: 4px; }
.ap-services-wrap::-webkit-scrollbar-thumb {
    background: var(--ap-gold-light);
    border-radius: 4px;
}

.ap-svc-group { margin-bottom: 20px; }
.ap-svc-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ap-text-muted);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--ap-border);
}

/* ─── SERVICE CARDS (vertical list — row by row) ──────────── */
.ap-svc-scroll {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 8px;
}

.ap-svc-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: var(--ap-cream);
    border: 1.5px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    cursor: pointer;
    transition: var(--ap-transition);
    position: relative;
    overflow: hidden;
}
.ap-svc-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--ap-gold);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}
.ap-svc-card:hover {
    border-color: var(--ap-gold);
    background: rgba(212,160,160,0.06);
}
.ap-svc-card:hover::after { transform: scaleY(1); }

.ap-svc-card.selected {
    background: var(--ap-charcoal);
    border-color: var(--ap-charcoal);
    color: #fff;
}
.ap-svc-card.selected::after { background: var(--ap-gold); transform: scaleY(1); }
.ap-svc-card.selected .ap-svc-price { color: var(--ap-gold-light); }
.ap-svc-card.selected .ap-svc-dur { color: rgba(255,255,255,0.6); }

.ap-svc-name {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
}
.ap-svc-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ap-svc-price { font-weight: 800; font-size: 0.92rem; color: var(--ap-gold-dark); }
.ap-svc-dur { font-size: 0.72rem; color: var(--ap-text-muted); white-space: nowrap; }

/* ─── CALENDAR ────────────────────────────────────────────── */
.ap-calendar-wrap {
    max-width: 380px;
    margin: 0 auto 24px;
}
.ui-datepicker {
    width: 100% !important;
    border: 1px solid var(--ap-border) !important;
    box-shadow: var(--ap-shadow);
    border-radius: var(--ap-radius);
    padding: 12px;
    font-family: inherit;
    background: #fff;
}
.ui-datepicker-header {
    background: var(--ap-charcoal) !important;
    border: none !important;
    border-radius: var(--ap-radius-sm) var(--ap-radius-sm) 0 0;
    color: #fff !important;
    padding: 10px;
}
.ui-datepicker-title { color: #fff !important; font-weight: 700; }
.ui-datepicker-prev,
.ui-datepicker-next {
    position: absolute !important;
    overflow: hidden !important;
    cursor: pointer !important;
}
.ui-datepicker-prev span,
.ui-datepicker-next span {
    visibility: hidden !important;
}
.ui-datepicker-prev::after {
    content: '\2039';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    pointer-events: none;
}
.ui-datepicker-next::after {
    content: '\203A';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    pointer-events: none;
}
.ui-datepicker th {
    font-weight: 600; font-size: 0.75rem;
    color: var(--ap-text-muted);
    padding: 8px 0;
}
.ui-datepicker td { padding: 2px; }
.ui-datepicker td a, .ui-datepicker td span {
    text-align: center !important;
    border-radius: 50% !important;
    width: 34px; height: 34px;
    line-height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 2px auto;
    border: none !important;
    font-size: 0.85rem;
}
.ui-datepicker table { width: 100%; border-collapse: separate; border-spacing: 2px; }
.ui-datepicker td { text-align: center; padding: 1px !important; }
.ui-datepicker th { text-align: center !important; }
.ui-datepicker td a:hover {
    background: var(--ap-cream-dark) !important;
}
.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-highlight {
    background: var(--ap-gold) !important;
    color: #fff !important;
    font-weight: 700;
}
.ui-datepicker .ui-state-disabled span {
    color: #ccc;
}

/* ─── TIMESLOTS ───────────────────────────────────────────── */
.ap-time-title {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ap-text-muted);
    margin-bottom: 14px;
}
.ap-time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ap-time-btn {
    padding: 10px 4px;
    border: 1.5px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    background: #fff;
    color: var(--ap-text);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--ap-transition);
    text-align: center;
}
.ap-time-btn:hover {
    border-color: var(--ap-gold);
    background: rgba(201,169,110,0.06);
}
.ap-time-btn.selected {
    background: var(--ap-charcoal);
    color: #fff;
    border-color: var(--ap-charcoal);
}
.ap-time-btn.selected::before {
    content: '✓ ';
    font-size: 0.7rem;
}

/* ─── HAIR OPTIONS ────────────────────────────────────────── */
.ap-hair-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.ap-hair-card {
    padding: 18px 12px;
    text-align: center;
    border: 1.5px solid var(--ap-border);
    border-radius: var(--ap-radius);
    cursor: pointer;
    transition: var(--ap-transition);
    background: #fff;
    user-select: none;
}
.ap-hair-card:hover {
    border-color: var(--ap-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.ap-hair-card.selected {
    background: var(--ap-charcoal);
    color: #fff;
    border-color: var(--ap-charcoal);
}
.ap-hair-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.ap-hair-label { font-weight: 700; font-size: 0.82rem; }

/* ─── DUO SWITCH ──────────────────────────────────────────── */
.ap-duo-wrap {
    background: var(--ap-cream);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ap-duo-label {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ap-duo-label i { color: var(--ap-gold); }
.ap-duo-input { display: none; }
.ap-duo-second { margin-top: 12px; display: none; }
.ap-duo-second.show { display: block; }

/* ─── SUMMARY CARD ────────────────────────────────────────── */
.ap-summary {
    background: var(--ap-charcoal);
    border-radius: var(--ap-radius);
    overflow: hidden;
    color: #fff;
}
.ap-summary-head {
    padding: 24px 24px 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.ap-summary-icon {
    width: 48px; height: 48px;
    background: rgba(201,169,110,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--ap-gold);
    flex-shrink: 0;
}
.ap-summary-service { font-weight: 800; font-size: 1.05rem; color: var(--ap-gold-light); }
.ap-summary-datetime { font-size: 0.88rem; opacity: 0.8; margin-top: 4px; }
.ap-summary-body {
    padding: 0 24px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.82rem;
}
.ap-summary-row { display: flex; justify-content: space-between; }
.ap-summary-row-label { opacity: 0.6; }
.ap-summary-footer {
    padding: 16px 24px;
    background: rgba(0,0,0,0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ap-summary-total-label { font-weight: 600; font-size: 0.9rem; }
.ap-summary-total-price { font-size: 1.4rem; font-weight: 800; color: var(--ap-gold); }

/* ─── FORM INPUTS ─────────────────────────────────────────── */
.ap-input {
    border: 1.5px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--ap-transition);
    width: 100%;
    background: #fff;
}
.ap-input:focus {
    border-color: var(--ap-gold);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
    outline: none;
}
.ap-label {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--ap-text);
    margin-bottom: 6px;
    display: block;
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.ap-btn {
    padding: 12px 32px;
    border-radius: var(--ap-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--ap-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ap-btn-primary {
    background: var(--ap-gold);
    color: #fff;
}
.ap-btn-primary:hover {
    background: var(--ap-gold-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201,169,110,0.3);
}
.ap-btn-ghost {
    background: transparent;
    color: var(--ap-text-muted);
    border: 1.5px solid var(--ap-border);
}
.ap-btn-ghost:hover {
    border-color: var(--ap-text);
    color: var(--ap-text);
}
.ap-btn-submit {
    background: var(--ap-charcoal);
    color: #fff;
    padding: 14px 40px;
    font-size: 1rem;
}
.ap-btn-submit:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

/* ─── NAV BUTTONS ─────────────────────────────────────────── */
.ap-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--ap-border);
}

/* ─── SPINNER ─────────────────────────────────────────────── */
.ap-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: var(--ap-text-muted);
    font-size: 0.85rem;
}

/* ─── CANCEL INFO ─────────────────────────────────────────── */
.ap-cancel-info {
    background: rgba(201,169,110,0.08);
    border: 1px solid rgba(201,169,110,0.25);
    border-radius: var(--ap-radius-sm);
    padding: 14px 18px;
    font-size: 0.85rem;
    color: var(--ap-text);
    margin-bottom: 20px;
}
.ap-cancel-info i { color: var(--ap-gold); margin-right: 8px; }

/* ─── MODALS ──────────────────────────────────────────────── */
.ap-modal .modal-content {
    background: var(--ap-charcoal);
    border: none;
    border-radius: var(--ap-radius);
    color: #fff;
    overflow: hidden;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .ap-card { padding: 20px 16px; }
    .ap-svc-card { padding: 10px 14px; }
    .ap-time-grid { grid-template-columns: repeat(3, 1fr); }
    .ap-hair-grid { grid-template-columns: repeat(3, 1fr); }
    .ap-summary-body { grid-template-columns: 1fr; }
    .ap-step-title { font-size: 1.15rem; }
}

@media (max-width: 480px) {
    .ap-card { padding: 16px 12px; }
    .ap-svc-card { padding: 10px 12px; }
    .ap-time-grid { grid-template-columns: repeat(3, 1fr); }
    .ap-hair-grid { grid-template-columns: repeat(2, 1fr); }
    .ap-nav { flex-direction: column; gap: 10px; }
    .ap-nav .ap-btn { width: 100%; justify-content: center; }
}
