/* ======================================================
   BOOKING.CSS - Barbershop Management System
   Online Booking Form Styles 
   Theme: Westcut Orange (Clean & Professional Mobile-First)
   ====================================================== */

:root {
    --primary: #E89204;
    --primary-hover: #D48400;
    --primary-light: #FFF4E6;
    --primary-dark: #B87500;
    --success: #10B981;
    --success-light: #D1FAE5;
    --success-text: #059669;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-text: #92400E;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --danger-text: #991B1B;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --info-text: #1D4ED8;
    --bg-body: #FFF9F0;
    --bg-surface: #FFFFFF;
    --bg-surface-active: #FFF4E6;
    --text-main: #2D2D2D;
    --text-muted: #757575;
    --text-light: #999999;
    --text-white: #FFFFFF;
    --border: #FFE5C0;
    --border-light: rgba(232, 146, 4, 0.15);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(232, 146, 4, 0.08);
    --shadow-md: 0 8px 24px rgba(232, 146, 4, 0.15);
    --shadow-orange: 0 8px 24px rgba(232, 146, 4, 0.2);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
html { overscroll-behavior-y: none; scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px; /* Mencegah auto-zoom di iOS saat input focus */
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(110px + env(safe-area-inset-bottom)); /* Ruang untuk sticky footer */
}

.booking-container { max-width: 600px; margin: 0 auto; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top)); }

/* ============================================ HEADER ============================================ */
.booking-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-orange);
    position: relative;
    overflow: hidden;
}
.booking-header::before {
    content: ''; position: absolute; top: -50%; right: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.booking-logo {
    width: 72px; height: 72px; margin: 0 auto 16px; background: rgba(255, 255, 255, 0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 32px; backdrop-filter: blur(10px); border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden; position: relative; z-index: 1; color: var(--text-white);
}
.booking-logo img { width: 100%; height: 100%; object-fit: cover; }
.booking-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; position: relative; z-index: 1; letter-spacing: -0.5px; color: var(--text-white); }
.booking-header p { font-size: 14px; opacity: 0.95; position: relative; z-index: 1; font-weight: 500; color: var(--text-white); }

/* ============================================ CABANG INFO ============================================ */
.cabang-selector {
    background: var(--bg-surface); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.cabang-selector label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.cabang-selector select {
    width: 100%; padding: 14px; font-size: 16px; font-family: inherit; font-weight: 600;
    color: var(--text-main); background: var(--bg-body); border: 1.5px solid var(--border); 
    border-radius: var(--radius-sm); outline: none; transition: var(--transition);
    min-height: 48px; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23E89204'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.cabang-selector select:active { transform: scale(0.98); background-color: var(--bg-surface-active); }
.cabang-selector select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

.cabang-info {
    background: var(--bg-surface); border-radius: var(--radius-md); padding: 16px; margin-bottom: 20px;
    box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: center;
    border-left: 4px solid var(--primary); border: 1px solid var(--border-light);
}
.cabang-icon {
    width: 48px; height: 48px; background: var(--primary-light); color: var(--primary);
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.cabang-details { flex: 1; min-width: 0; }
.cabang-name { font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.cabang-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.cabang-meta span { display: flex; align-items: center; gap: 6px; }
.cabang-meta i { color: var(--primary); font-size: 12px; }

/* ============================================ FORM CARDS ============================================ */
.form-card {
    background: var(--bg-surface); border-radius: var(--radius-lg); padding: 20px;
    margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.form-card-title {
    font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light);
}
.form-card-title i { color: var(--primary); font-size: 18px; }
.form-card-title .step {
    width: 28px; height: 28px; background: var(--primary); color: var(--text-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-hint-inline { font-size: 12px; color: var(--text-light); font-weight: 400; margin-left: 4px; font-style: italic; }

.form-control {
    width: 100%; padding: 14px; font-size: 16px; font-family: inherit; color: var(--text-main);
    background: var(--bg-body); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    outline: none; transition: var(--transition); min-height: 48px; /* Touch target standar */
}
.form-control:active { background: var(--bg-surface-active); }
.form-control:focus { border-color: var(--primary); background: var(--bg-surface); box-shadow: 0 0 0 4px var(--primary-light); }
.form-control:disabled, .form-control[readonly] { opacity: 0.6; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 100px; }

.input-wrapper { position: relative; }
.input-icon-right {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 18px; pointer-events: none;
}

/* ============================================ CUSTOMER STATUS & SUGGESTIONS ============================================ */
.customer-status {
    display: flex; align-items: center; gap: 14px; padding: 16px;
    background: var(--bg-body); border-radius: var(--radius-md); margin-bottom: 16px;
    border-left: 4px solid var(--primary); animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.customer-status.found { background: var(--success-light); border-left-color: var(--success); }
.customer-status.not-found { background: var(--info-light); border-left-color: var(--info); }
.customer-status.loading { background: var(--warning-light); border-left-color: var(--warning); }

.customer-status-icon {
    width: 44px; height: 44px; background: var(--bg-surface); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; color: var(--primary);
}
.customer-status.found .customer-status-icon { background: var(--success); color: var(--text-white); }
.customer-status.not-found .customer-status-icon { background: var(--info); color: var(--text-white); }
.customer-status.loading .customer-status-icon { background: var(--warning); color: var(--text-white); }

.customer-status-info { flex: 1; min-width: 0; }
.customer-status-text { font-size: 14px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.customer-status.found .customer-status-text { color: var(--success-text); }
.customer-status.not-found .customer-status-text { color: var(--info-text); }
.customer-status.loading .customer-status-text { color: var(--warning-text); }

.customer-status-detail { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.customer-status-detail span { display: inline-flex; align-items: center; gap: 6px; }
.customer-status-detail i { font-size: 12px; }
.customer-status-detail .tier-badge {
    padding: 3px 8px; background: var(--warning-light); color: var(--warning-text);
    border-radius: 20px; font-weight: 700; font-size: 11px;
}

.customer-suggestions {
    background: var(--bg-body); border-radius: var(--radius-md); padding: 16px;
    margin-bottom: 16px; border: 1px solid var(--border); animation: slideDown 0.3s ease;
}
.suggestions-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.suggestions-title i { color: var(--primary); }
.suggestions-list { display: flex; flex-direction: column; gap: 10px; }

.suggestion-item {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    background: var(--bg-surface); border: 1.5px solid transparent; border-radius: var(--radius-md);
    cursor: pointer; transition: var(--transition-bounce);
}
.suggestion-item:active { transform: scale(0.98); background: var(--bg-surface-active); }
.suggestion-item:hover { border-color: var(--border); }
.suggestion-item.selected { border-color: var(--primary); background: var(--primary-light); }

.suggestion-avatar {
    width: 44px; height: 44px; background: var(--primary); color: var(--text-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-size: 15px; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
.suggestion-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.suggestion-meta span { display: inline-flex; align-items: center; gap: 4px; }
.suggestion-meta i { font-size: 12px; color: var(--primary); }

/* ============================================ BARBER (Horizontal Scroll Mobile) ============================================ */
.barber-grid { 
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; gap: 12px; padding-bottom: 8px; scrollbar-width: none; 
}
.barber-grid::-webkit-scrollbar { display: none; }

.barber-option {
    min-width: 130px; scroll-snap-align: start; flex-shrink: 0;
    padding: 16px 12px; background: var(--bg-body); border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-bounce); text-align: center;
    min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.barber-option:active { transform: scale(0.96); background: var(--bg-surface-active); }
.barber-option:hover { border-color: var(--border); }
.barber-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow-orange); }
.barber-option input { display: none; }

.barber-avatar {
    width: 56px; height: 56px; margin: 0 auto 12px; background: var(--primary-light); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; overflow: hidden; border: 2px solid var(--border);
}
.barber-avatar img { width: 100%; height: 100%; object-fit: cover; }
.barber-name { font-size: 14px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.barber-specialty { font-size: 12px; color: var(--text-muted); }

/* ============================================
   CATEGORY CHIPS FILTER (STICKY WORKING)
   ============================================ */

/* HAPUS overflow: hidden dari form-card karena merusak sticky! */
.form-card {
    position: relative;
    /* JANGAN gunakan overflow: hidden di sini! */
}

/* Container untuk mencegah horizontal overflow secara global */
.booking-container {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.category-chips-container {
    position: sticky;
    top: 0; /* Menempel di atas viewport */
    z-index: 50; /* Pastikan di atas elemen lain */
    background: var(--bg-surface);
    padding: 12px 0 16px 0;
    margin: 0 0 16px 0;
    border-bottom: 1px solid var(--border-light);
    /* Penting untuk sticky yang proper */
    width: calc(100% + 0px);
}

.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
    /* Agar chips bisa di-scroll horizontal */
    -webkit-overflow-scrolling: touch;
}
.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--bg-body);
    border: 1.5px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}
.category-chip:active { 
    transform: scale(0.95); 
    background: var(--bg-surface-active); 
}
.category-chip.active {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.category-chip i { font-size: 12px; }

.layanan-option.hidden {
    display: none !important;
}

.layanan-option {
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.layanan-list { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 12px;
    width: 100%;
}

.layanan-option {
    position: relative; 
    display: flex; 
    flex-direction: column; 
    padding: 16px 14px;
    background: var(--bg-surface); 
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md); 
    cursor: pointer; 
    transition: var(--transition-bounce); 
    min-height: 130px;
    width: 100%;
    box-sizing: border-box;
}

/* Untuk mobile - pastikan sticky bekerja */
@media (max-width: 768px) {
    .category-chips-container {
        top: 0;
        /* Tambahkan shadow saat sticky */
        box-shadow: 0 2px 8px rgba(232, 146, 4, 0.1);
    }
}
.layanan-option:active { transform: scale(0.96); background: var(--bg-surface-active); }
.layanan-option:hover { border-color: var(--primary); }
.layanan-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow-orange); }
.layanan-option input { display: none; }

.layanan-checkbox {
    position: absolute; top: 12px; right: 12px; width: 22px; height: 22px;
    border: 2px solid var(--border); border-radius: 50%; background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center; color: var(--text-white); transition: var(--transition);
}
.layanan-option.selected .layanan-checkbox { background: var(--primary); border-color: var(--primary); }
.layanan-checkbox i { font-size: 11px; opacity: 0; transition: opacity 0.2s ease; }
.layanan-option.selected .layanan-checkbox i { opacity: 1; }

.layanan-icon-wrapper {
    width: 42px; height: 42px; background: var(--primary-light); color: var(--primary);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin-bottom: 12px; transition: var(--transition);
}
.layanan-option.selected .layanan-icon-wrapper { background: var(--primary); color: var(--text-white); }

.layanan-info { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; padding-right: 24px; }
.layanan-name { font-size: 14px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; line-height: 1.4; }
.layanan-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: auto; }
.layanan-meta i { color: var(--primary); font-size: 12px; }
.layanan-price { margin-top: 12px; font-size: 15px; font-weight: 800; color: var(--primary); text-align: right; letter-spacing: -0.5px; }

/* Responsive Grid untuk Layanan */
@media (min-width: 480px) { .layanan-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .layanan-list { grid-template-columns: repeat(3, 1fr); } }

/* ============================================ SCHEDULE & TIME SLOTS ============================================ */
.schedule-info {
    padding: 14px; background: var(--info-light); border-radius: var(--radius-sm);
    margin-top: 14px; font-size: 13px; color: var(--info-text); border-left: 4px solid var(--info);
    display: flex; align-items: center; gap: 10px;
}
.schedule-info.error { background: var(--warning-light); border-left-color: var(--warning); color: var(--warning-text); }
.schedule-info i { font-size: 16px; flex-shrink: 0; }

.time-slots { 
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; gap: 10px; margin-top: 14px; padding-bottom: 8px; scrollbar-width: none;
}
.time-slots::-webkit-scrollbar { display: none; }

.time-slot {
    min-width: 85px; scroll-snap-align: start; flex-shrink: 0;
    padding: 14px 8px; background: var(--bg-body); border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition-bounce);
    text-align: center; font-size: 14px; font-weight: 600; color: var(--text-main);
    min-height: 48px; display: flex; align-items: center; justify-content: center;
}
.time-slot:active { transform: scale(0.95); background: var(--bg-surface-active); }
.time-slot:hover { border-color: var(--border); }
.time-slot.selected { background: var(--primary); color: var(--text-white); border-color: var(--primary); font-weight: 700; box-shadow: var(--shadow-orange); }
.time-slot input { display: none; }
.time-slot.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.time-slot.disabled:active { transform: none; }

.no-slots {
    padding: 24px; text-align: center; color: var(--warning-text); font-size: 14px; font-weight: 500;
    background: var(--warning-light); border-radius: var(--radius-md); 
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ============================================ SUMMARY & SUBMIT ============================================ */
.summary-card {
    background: var(--bg-surface); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 100px;
    border: 1px solid var(--primary); box-shadow: var(--shadow-orange);
}
.summary-title { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 600; color: var(--text-main); text-align: right; }
.summary-total { border-top: 1px dashed var(--border); margin-top: 12px; padding-top: 16px; font-size: 16px; }
.summary-total .summary-value { color: var(--primary); font-size: 22px; font-weight: 800; }

.submit-wrapper {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-light); z-index: 100;
    display: flex; justify-content: center;
}
.submit-wrapper-inner { max-width: 600px; width: 100%; }

.btn-submit {
    width: 100%; padding: 16px; background: var(--primary); color: var(--text-white); border: none;
    border-radius: var(--radius-md); font-size: 16px; font-weight: 800; cursor: pointer;
    transition: var(--transition-bounce); font-family: inherit; display: flex; align-items: center;
    justify-content: center; gap: 10px; box-shadow: var(--shadow-orange); min-height: 56px;
}
.btn-submit:active:not(:disabled) { transform: scale(0.97); background: var(--primary-hover); }
.btn-submit:hover:not(:disabled) { box-shadow: 0 12px 28px rgba(232, 146, 4, 0.3); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.info-box {
    display: flex; gap: 12px; padding: 16px; background: var(--primary-light);
    border-radius: var(--radius-md); margin-bottom: 20px; font-size: 13px; color: var(--text-main);
    border: 1px solid var(--border-light); line-height: 1.5;
}
.info-box i { color: var(--primary); flex-shrink: 0; margin-top: 2px; font-size: 18px; }

/* ============================================ LOADING & TOAST ============================================ */
.loading-state { text-align: center; padding: 32px 24px; color: var(--text-muted); font-size: 14px; }
.loading-state i { font-size: 32px; color: var(--primary); margin-bottom: 12px; }

.toast-container {
    position: fixed; top: calc(24px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none; width: 90%; max-width: 400px;
}
.toast {
    background: var(--bg-surface); padding: 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; border-left: 4px solid var(--primary);
    animation: toastSlide 0.3s ease; pointer-events: auto; border: 1px solid var(--border-light); color: var(--text-main);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast i { font-size: 20px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
@keyframes toastSlide { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.loading-overlay {
    display: none; position: fixed; inset: 0; background: rgba(45, 45, 45, 0.5); z-index: 9998;
    align-items: center; justify-content: center; backdrop-filter: blur(6px);
}
.loading-overlay.active { display: flex; }
.loading-spinner {
    background: var(--bg-surface); padding: 32px 48px; border-radius: var(--radius-lg);
    text-align: center; box-shadow: var(--shadow-md); border: 1px solid var(--border-light);
}
.loading-spinner i { font-size: 40px; color: var(--primary); margin-bottom: 16px; }
.loading-spinner p { font-size: 15px; color: var(--text-main); font-weight: 600; }

/* ============================================ FOOTER & PWA ============================================ */
.booking-footer { text-align: center; padding: 24px 16px; font-size: 12px; color: var(--text-light); font-weight: 500; }

.pwa-install-banner {
    position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: 500px; background: var(--bg-surface); color: var(--text-main);
    padding: 18px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); z-index: 9997;
    border: 1px solid var(--border); animation: slideUpBanner 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUpBanner { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

.pwa-banner-content { display: flex; align-items: center; gap: 14px; }
.pwa-banner-icon {
    width: 48px; height: 48px; background: var(--primary-light); color: var(--primary); border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; border: 1px solid var(--border);
}
.pwa-banner-info { flex: 1; min-width: 0; }
.pwa-banner-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; color: var(--text-main); }
.pwa-banner-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.pwa-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }

.pwa-btn-install {
    padding: 10px 18px; background: var(--primary); color: var(--text-white); border: none;
    border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer;
    transition: var(--transition); font-family: inherit; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pwa-btn-install:active { transform: scale(0.95); }

.pwa-btn-close {
    width: 36px; height: 36px; background: var(--bg-body); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.pwa-btn-close:active { background: var(--bg-surface-active); transform: scale(0.95); }

.ios-install-guide {
    position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: 500px; background: var(--bg-surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); z-index: 9997; border: 1px solid var(--border); padding: 20px;
    animation: slideUpBanner 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ios-guide-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-weight: 700; color: var(--text-main); }
.ios-guide-header i { font-size: 20px; color: var(--text-main); }
.ios-guide-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.ios-guide-steps { list-style: none; counter-reset: step; padding: 0; }
.ios-guide-steps li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--text-muted); counter-increment: step; }
.ios-guide-steps li::before { content: counter(step); width: 24px; height: 24px; background: var(--primary); color: var(--text-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ios-guide-steps li strong { color: var(--text-main); }
.ios-guide-steps li i { color: var(--primary); }

/* ============================================ RESPONSIVE MOBILE ENHANCEMENTS ============================================ */
@media (max-width: 480px) {
    .booking-container { padding: 16px; padding-bottom: 120px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .booking-header { padding: 24px 20px; border-radius: var(--radius-md); }
    .booking-header h1 { font-size: 20px; }
    .booking-logo { width: 64px; height: 64px; font-size: 28px; }
    .form-hint-inline { display: block; margin-left: 0; margin-top: 6px; }
    .summary-total .summary-value { font-size: 20px; }
}
/* ============================================
   NATIVE MOBILE APP ENHANCEMENTS (Gojek/Grab Style)
   ============================================ */

/* 1. Smooth Momentum Scrolling & Prevent Pull-to-Refresh */
html, body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* 2. Glassmorphism Sticky Category Header (Like iOS/Android) */
.category-chips-container {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92); /* Semi-transparan */
    backdrop-filter: blur(12px); /* Efek kaca buram */
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px 16px 16px;
    margin: 0 -20px 16px -20px; /* Stretch ke ujung card */
    border-bottom: 1px solid rgba(232, 146, 4, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.category-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    padding: 10px 18px;
    background: #F8F9FA;
    border: 1px solid transparent;
    border-radius: 24px; /* Lebih bulat seperti pill */
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}
.category-chip:active { transform: scale(0.92); }
.category-chip.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(232, 146, 4, 0.3); /* Soft colored shadow */
}

/* 3. Gojek-Style Service Cards (Row Layout) */
.layanan-list { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 12px;
    width: 100%;
}

.layanan-option {
    position: relative; 
    display: flex; 
    align-items: center; /* Rata tengah secara vertikal */
    padding: 16px;
    background: var(--bg-surface); 
    border: 1.5px solid var(--border-light);
    border-radius: 16px; 
    cursor: pointer; 
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}
.layanan-option:active { 
    transform: scale(0.98); 
    background: var(--bg-surface-active); 
}
.layanan-option.selected { 
    border-color: var(--primary); 
    background: var(--primary-light); 
    box-shadow: 0 4px 16px rgba(232, 146, 4, 0.15); 
}

.layanan-icon-wrapper {
    width: 48px; 
    height: 48px; 
    background: var(--primary-light); 
    color: var(--primary);
    border-radius: 14px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 20px; 
    margin-right: 14px;
    flex-shrink: 0;
    transition: var(--transition);
}
.layanan-option.selected .layanan-icon-wrapper { 
    background: var(--primary); 
    color: var(--text-white); 
}

.layanan-info { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.layanan-name { 
    font-size: 15px; 
    font-weight: 700; 
    color: var(--text-main); 
    margin-bottom: 4px; 
}
.layanan-meta { 
    font-size: 12px; 
    color: var(--text-muted); 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.layanan-price { 
    font-size: 15px; 
    font-weight: 800; 
    color: var(--primary); 
    text-align: right;
    flex-shrink: 0;
    margin-left: 8px;
}

.layanan-checkbox {
    position: absolute; 
    top: 16px; 
    right: 16px; 
    width: 24px; 
    height: 24px;
    border: 2px solid var(--border); 
    border-radius: 50%; 
    background: var(--bg-surface);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: var(--transition);
}
.layanan-option.selected .layanan-checkbox { 
    background: var(--primary); 
    border-color: var(--primary); 
    transform: scale(1.1); /* Efek "pop" saat dipilih */
}
.layanan-checkbox i { 
    font-size: 12px; 
    opacity: 0; 
    transition: opacity 0.2s ease; 
    color: white;
}
.layanan-option.selected .layanan-checkbox i { 
    opacity: 1; 
}

/* 4. Bottom Sheet Summary (Panel Bawah ala Gojek) */
.summary-card {
    background: var(--bg-surface); 
    border-radius: 24px 24px 0 0; /* Sudut atas membulat */
    padding: 24px 20px calc(100px + env(safe-area-inset-bottom)) 20px; 
    margin: 0 -16px -110px -16px; /* Menempel di tepi dan menumpuk footer */
    border: none;
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08); /* Bayangan ke atas */
    position: relative;
    z-index: 40;
}
/* Garis "handle" kecil di atas untuk indikasi bottom sheet */
.summary-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
}

.summary-title { 
    font-size: 16px; 
    font-weight: 800; 
    color: var(--text-main); 
    margin-bottom: 20px; 
    margin-top: 12px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.summary-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 10px 0; 
    font-size: 14px; 
    border-bottom: 1px dashed var(--border-light);
}
.summary-row:last-of-type { border-bottom: none; }
.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 600; color: var(--text-main); text-align: right; }
.summary-total { 
    border-top: 2px solid var(--text-main); 
    margin-top: 16px; 
    padding-top: 16px; 
    border-bottom: none;
}
.summary-total .summary-label { 
    font-size: 16px; 
    font-weight: 700; 
    color: var(--text-main); 
}
.summary-total .summary-value { 
    color: var(--primary); 
    font-size: 24px; 
    font-weight: 800; 
}

/* 5. Native Submit Button (Tombol Utama) */
.submit-wrapper {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom)) 20px;
    border-top: 1px solid rgba(0,0,0,0.05); 
    z-index: 100;
    display: flex; 
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.submit-wrapper-inner { 
    max-width: 600px; 
    width: 100%; 
}

.btn-submit {
    width: 100%; 
    padding: 18px; 
    background: var(--primary); 
    color: var(--text-white); 
    border: none;
    border-radius: 16px; 
    font-size: 16px; 
    font-weight: 800; 
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    font-family: inherit; 
    display: flex; 
    align-items: center;
    justify-content: center; 
    gap: 10px; 
    box-shadow: 0 8px 24px rgba(232, 146, 4, 0.35); 
    min-height: 56px;
    letter-spacing: 0.3px;
}
.btn-submit:active:not(:disabled) { 
    transform: scale(0.96); 
    background: var(--primary-hover); 
    box-shadow: 0 4px 12px rgba(232, 146, 4, 0.2);
}
.btn-submit:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
    transform: none; 
    box-shadow: none; 
}

/* 6. Modern Form Inputs (Native Feel) */
.form-control {
    width: 100%; 
    padding: 16px; 
    font-size: 16px; /* Mencegah auto-zoom di iOS */
    font-family: inherit; 
    color: var(--text-main);
    background: #F8F9FA; /* Abu-abu sangat muda untuk kedalaman */
    border: 1.5px solid transparent; 
    border-radius: 14px;
    outline: none; 
    transition: all 0.2s ease; 
    min-height: 52px; 
}
.form-control:active { background: #F0F1F3; }
.form-control:focus { 
    background: var(--bg-surface); 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px var(--primary-light); 
}

/* 7. Enhanced Barber Cards */
.barber-option {
    min-width: 120px; 
    scroll-snap-align: start; 
    flex-shrink: 0;
    padding: 16px 12px; 
    background: var(--bg-surface); 
    border: 1.5px solid var(--border-light);
    border-radius: 16px; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    text-align: center;
    min-height: 130px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
}
.barber-option:active { transform: scale(0.94); }
.barber-option.selected { 
    border-color: var(--primary); 
    background: var(--primary-light); 
    box-shadow: 0 6px 20px rgba(232, 146, 4, 0.2); 
}