/* ============================================================
   Nmar Salon Booking — Public Booking Wizard CSS
   Premium Dark-Mode Inspired Design with Glassmorphism accents
   ============================================================ */

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

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --nb-primary:      #1a2742;
    --nb-accent:       #3b82f6;
    --nb-accent-light: #60a5fa;
    --nb-gold:         #f59e0b;
    --nb-success:      #10b981;
    --nb-danger:       #ef4444;
    --nb-bg:           #f8fafc;
    --nb-card:         #ffffff;
    --nb-border:       #e2e8f0;
    --nb-text:         #1e293b;
    --nb-muted:        #64748b;
    --nb-radius:       14px;
    --nb-shadow:       0 4px 24px rgba(0,0,0,0.08);
    --nb-shadow-lg:    0 12px 48px rgba(0,0,0,0.14);
    --nb-transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Wizard Wrapper ─────────────────────────────────────────── */
#nmar-booking-wizard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: var(--nb-text);
    line-height: 1.6;
}

/* ── Progress Bar ───────────────────────────────────────────── */
.nmar-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    padding: 0 10px;
    flex-wrap: nowrap;
}
.nmar-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.nmar-step-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nb-border);
    color: var(--nb-muted);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--nb-transition);
    border: 2.5px solid transparent;
}
.nmar-progress-step span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--nb-muted);
    white-space: nowrap;
    transition: var(--nb-transition);
}
.nmar-progress-line {
    flex: 1;
    height: 3px;
    background: var(--nb-border);
    margin: 0 8px;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: background 0.4s;
    min-width: 24px;
}
/* Active step */
.nmar-progress-step.nmar-step-active .nmar-step-bubble {
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-accent));
    color: #fff;
    border-color: var(--nb-accent-light);
    box-shadow: 0 0 0 5px rgba(59,130,246,0.15);
    transform: scale(1.08);
}
.nmar-progress-step.nmar-step-active span { color: var(--nb-accent); }
/* Completed step */
.nmar-progress-step.nmar-step-done .nmar-step-bubble {
    background: var(--nb-success);
    color: #fff;
    border-color: transparent;
}
.nmar-progress-step.nmar-step-done span { color: var(--nb-success); }
.nmar-progress-line.nmar-line-done { background: var(--nb-success); }

/* ── Steps ──────────────────────────────────────────────────── */
.nmar-step { display: none; animation: nmarFadeIn 0.4s ease; }
.nmar-step-visible { display: block; }

@keyframes nmarFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nmar-step-header {
    margin-bottom: 24px;
    text-align: center;
}
.nmar-step-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--nb-primary);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.nmar-step-header p {
    color: var(--nb-muted);
    font-size: 15px;
    margin: 0;
}

/* ── Step 1: Services ───────────────────────────────────────── */
.nmar-wizard-body {
    position: relative;
}

/* Step 1 uses a 2-col layout: services list + summary */
#nmar-step-1 {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}
#nmar-step-1.nmar-step-visible { display: grid; }
.nmar-step-content { min-width: 0; }

.nmar-services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Main Service Item */
.nmar-main-service-item {
    border: 2px solid var(--nb-border);
    border-radius: var(--nb-radius);
    overflow: hidden;
    background: var(--nb-card);
    box-shadow: var(--nb-shadow);
    transition: border-color 0.25s;
}
.nmar-main-service-item.nmar-service-open { border-color: var(--nb-accent); }

.nmar-main-service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    gap: 12px;
}
.nmar-main-service-header:hover { background: #f8fafc; }
.nmar-main-service-item.nmar-service-open .nmar-main-service-header { background: linear-gradient(135deg, #eef2ff, #e0f2fe); }
.nmar-main-service-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.nmar-service-icon { font-size: 22px; flex-shrink: 0; }
.nmar-service-name { font-size: 16px; font-weight: 700; color: var(--nb-primary); }
.nmar-service-desc { font-size: 12.5px; color: var(--nb-muted); display: block; }
.nmar-expand-icon {
    font-size: 11px;
    color: var(--nb-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
}
.nmar-main-service-item.nmar-service-open .nmar-expand-icon { transform: rotate(180deg); color: var(--nb-accent); }

/* Sub-services Dropdown */
.nmar-sub-services-dropdown {
    background: #f8fafc;
    border-top: 1px solid var(--nb-border);
    padding: 0;
    max-height: 0;
    overflow: scroll;
    transition: max-height 0.4s ease, padding 0.3s;
}
.nmar-sub-services-dropdown.nmar-dropdown-open {
    max-height: 450px;
    padding: 12px 16px;
    overflow-y: auto;
}

/* Custom scrollbar for sub-services dropdown */
.nmar-sub-services-dropdown::-webkit-scrollbar {
    width: 6px;
}
.nmar-sub-services-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.nmar-sub-services-dropdown::-webkit-scrollbar-thumb {
    background: var(--nb-border);
    border-radius: 4px;
}
.nmar-sub-services-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--nb-muted);
}

.nmar-sub-services-loading { text-align: center; color: var(--nb-muted); padding: 16px; font-size: 13px; }

.nmar-sub-service-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    border: 1.5px solid transparent;
    margin-bottom: 6px;
    background: #fff;
}
.nmar-sub-service-option:hover { background: #eff6ff; border-color: #bfdbfe; }
.nmar-sub-service-option.nmar-sub-selected {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-color: var(--nb-accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}
.nmar-sub-service-option input[type="checkbox"] {
    width: 18px; height: 18px;
    border-radius: 5px;
    cursor: pointer;
    accent-color: var(--nb-accent);
    flex-shrink: 0;
}
.nmar-sub-service-label { flex: 1; }
.nmar-sub-service-label strong { font-size: 14px; color: var(--nb-text); display: block; }
.nmar-sub-service-label small { font-size: 11.5px; color: var(--nb-muted); }
.nmar-sub-service-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--nb-accent);
    white-space: nowrap;
}
.nmar-sub-duration-badge {
    font-size: 11px;
    background: #f1f5f9;
    color: var(--nb-muted);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.nmar-no-sub-msg { color: var(--nb-muted); font-size: 13px; padding: 12px 4px; }

/* ── Booking Summary Panel ──────────────────────────────────── */
.nmar-booking-summary {
    background: var(--nb-card);
    border: 2px solid var(--nb-border);
    border-radius: var(--nb-radius);
    box-shadow: var(--nb-shadow);
    padding: 20px;
    position: sticky;
    top: 24px;
}
.nmar-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--nb-border);
    font-size: 18px;
}
.nmar-summary-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--nb-primary); }
.nmar-summary-items { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.nmar-summary-empty { color: var(--nb-muted); font-size: 13px; font-style: italic; }
.nmar-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    animation: nmarSlideIn 0.25s ease;
}
@keyframes nmarSlideIn {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}
.nmar-summary-item-name { font-weight: 600; color: var(--nb-text); }
.nmar-summary-item-price { font-weight: 700; color: var(--nb-accent); white-space: nowrap; }
.nmar-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid var(--nb-border);
    font-size: 15px;
    font-weight: 700;
}
.nmar-summary-total strong { color: var(--nb-success); font-size: 18px; }

/* ── Step 2: Employees ──────────────────────────────────────── */
.nmar-employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.nmar-employee-card-select {
    background: var(--nb-card);
    border: 2.5px solid var(--nb-border);
    border-radius: var(--nb-radius);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--nb-transition);
    box-shadow: var(--nb-shadow);
}
.nmar-employee-card-select:hover {
    border-color: var(--nb-accent-light);
    transform: translateY(-4px);
    box-shadow: var(--nb-shadow-lg);
}
.nmar-employee-card-select.nmar-emp-selected {
    border-color: var(--nb-accent);
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}
.nmar-employee-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-accent));
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.nmar-avatar-any { background: linear-gradient(135deg, #f59e0b, #ef4444); font-size: 24px; }
.nmar-employee-card-select h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--nb-primary);
    margin: 0 0 4px;
}
.nmar-employee-card-select p {
    font-size: 12px;
    color: var(--nb-muted);
    margin: 0;
}

/* ── Step 3: Date & Time ────────────────────────────────────── */
.nmar-datetime-container {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 24px;
    margin-bottom: 28px;
}
.nmar-date-picker-wrap label,
.nmar-time-slots-wrap label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--nb-text);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nmar-date-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--nb-border);
    border-radius: var(--nb-radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--nb-text);
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.nmar-date-input:focus {
    outline: none;
    border-color: var(--nb-accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.nmar-time-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
}
.nmar-time-slots-grid::-webkit-scrollbar { width: 5px; }
.nmar-time-slots-grid::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.nmar-time-slots-grid::-webkit-scrollbar-thumb { background: var(--nb-border); border-radius: 4px; }
.nmar-slots-placeholder,
.nmar-slots-empty,
.nmar-slots-loading { color: var(--nb-muted); font-size: 13.5px; padding: 16px 4px; width: 100%; }
.nmar-slots-loading { display: flex; align-items: center; gap: 8px; }
.nmar-slot-badge {
    padding: 9px 16px;
    border: 2px solid var(--nb-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: var(--nb-text);
    transition: var(--nb-transition);
    white-space: nowrap;
}
.nmar-slot-badge:hover {
    border-color: var(--nb-accent);
    background: #eff6ff;
    color: var(--nb-accent);
    transform: translateY(-2px);
}
.nmar-slot-badge.nmar-slot-selected {
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-accent));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59,130,246,0.35);
    transform: translateY(-2px);
}

/* ── Step 4: Customer Form ──────────────────────────────────── */
.nmar-booking-review {
    background: linear-gradient(135deg, #f0fdf4, #eff6ff);
    border: 1px solid #bbf7d0;
    border-radius: var(--nb-radius);
    padding: 18px 20px;
    margin-bottom: 24px;
    font-size: 14px;
}
.nmar-booking-review h4 { margin: 0 0 12px; font-size: 14px; color: var(--nb-primary); font-weight: 700; }
.nmar-review-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.nmar-review-label { color: var(--nb-muted); font-weight: 600; min-width: 90px; font-size: 12.5px; }
.nmar-review-value { color: var(--nb-text); font-weight: 500; }

.nmar-form-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
.nmar-field-full { grid-column: 1 / -1; }
.nmar-field-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--nb-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
}
.nmar-field-group input,
.nmar-field-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--nb-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--nb-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.nmar-field-group input:focus,
.nmar-field-group textarea:focus {
    outline: none;
    border-color: var(--nb-accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}
.nmar-field-group input.nmar-input-error { border-color: var(--nb-danger); }

/* ── Step Footer (Nav Buttons) ─────────────────────────────── */
.nmar-step-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--nb-border);
    flex-wrap: wrap;
}

.nmar-validation-msg {
    flex: 1;
    color: var(--nb-danger);
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.nmar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-accent));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--nb-transition);
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(59,130,246,0.28);
    white-space: nowrap;
}
.nmar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.36);
    opacity: 0.93;
}
.nmar-btn:active { transform: translateY(0); }
.nmar-btn-secondary {
    background: #f1f5f9;
    color: var(--nb-muted);
    box-shadow: none;
}
.nmar-btn-secondary:hover { background: #e2e8f0; box-shadow: none; }
.nmar-btn-submit {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 14px rgba(16,185,129,0.32);
}
.nmar-btn-submit:hover { box-shadow: 0 8px 24px rgba(16,185,129,0.42); }

/* ── Success Screen ─────────────────────────────────────────── */
.nmar-success-screen {
    text-align: center;
    padding: 50px 32px;
    max-width: 520px;
    margin: 0 auto;
}
.nmar-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: nmarPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes nmarPop {
    from { transform: scale(0.4) rotate(-20deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.nmar-success-screen h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--nb-success);
    margin: 0 0 12px;
}
.nmar-success-screen p {
    color: var(--nb-muted);
    font-size: 15px;
    margin-bottom: 20px;
}
.nmar-success-details {
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: var(--nb-radius);
    padding: 18px 22px;
    margin: 20px 0 28px;
    text-align: left;
}
.nmar-success-detail-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #d1fae5; font-size: 14px; }
.nmar-success-detail-row:last-child { border-bottom: none; }
.nmar-success-detail-label { color: var(--nb-muted); font-weight: 600; }
.nmar-success-detail-value { color: var(--nb-text); font-weight: 700; }

/* ── Empty state ─────────────────────────────────────────────── */
.nmar-empty-msg {
    text-align: center;
    padding: 40px;
    color: var(--nb-muted);
    font-size: 15px;
    background: #f8fafc;
    border-radius: var(--nb-radius);
    border: 2px dashed var(--nb-border);
}

/* ── Loading spinner ──────────────────────────────────────────── */
.nmar-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(59,130,246,0.2);
    border-top-color: var(--nb-accent);
    border-radius: 50%;
    animation: nmarSpin 0.7s linear infinite;
}
@keyframes nmarSpin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
    #nmar-step-1, #nmar-step-1.nmar-step-visible {
        display: block;
    }
    .nmar-booking-summary {
        position: static;
        margin-top: 20px;
    }
    .nmar-datetime-container { grid-template-columns: 1fr; }
    .nmar-form-fields { grid-template-columns: 1fr; }
    .nmar-field-full { grid-column: 1; }
    .nmar-progress-bar { gap: 0; }
    .nmar-progress-step span { display: none; }
    .nmar-step-bubble { width: 32px; height: 32px; font-size: 12px; }
    .nmar-progress-line { min-width: 16px; }
    .nmar-step-footer { flex-direction: column; align-items: stretch; }
    .nmar-btn { justify-content: center; }
    .nmar-employees-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .nmar-employees-grid { grid-template-columns: 1fr; }
}
