/* booking.css - Premium Ocean Theme */
:root {
    --ocean-blue: #0ea5e9;
    --deep-ocean: #0284c7;
    --midnight-blue: #0f172a;
    --sand: #f8fafc;
    --coral-alert: #ef4444;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, var(--sand) 0%, #e0f2fe 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.booking-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.booking-header {
    background: var(--midnight-blue);
    padding: 40px 20px 80px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.booking-header::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -10%;
    width: 120%;
    height: 120px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

.booking-header img.logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 4px solid rgba(14, 165, 233, 0.3);
}

.booking-header h1 {
    font-size: 26px;
    font-weight: 700;
    position: relative;
    z-index: 2;
    margin-bottom: 0px;
    line-height: 1.2;
}

.booking-header p {
    color: #94a3b8;
    font-size: 14px;
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

.booking-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-main);
    background: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--ocean-blue);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.price-summary {
    background: #f0f9ff;
    border: 1px dashed var(--ocean-blue);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 14px;
    color: var(--deep-ocean);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--midnight-blue);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--ocean-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--deep-ocean);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    color: var(--coral-alert);
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-control.is-invalid {
    border-color: var(--coral-alert);
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .booking-container {
        border-radius: 15px;
    }
    .booking-form {
        padding: 20px;
    }
}

/* Spinner for loading state */
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: white;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
    0% { transform: scale(0); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Custom Dropdown UI */
.custom-dropdown-group {
    position: relative;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--midnight-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-trigger:focus, .custom-select-trigger:active {
    outline: none;
    border-color: var(--ocean-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.custom-select-trigger i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-dropdown-group.open .custom-select-trigger i {
    transform: rotate(180deg);
}

.custom-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: none;
    flex-direction: column;
    max-height: 350px;
}

.custom-dropdown-group.open .custom-select-panel {
    display: flex;
}

.custom-select-search {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    background: #f8fafc;
    gap: 10px;
}

.custom-select-search i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.custom-select-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--midnight-blue);
    outline: none;
}

.close-panel-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
}

.custom-select-options {
    overflow-y: auto;
    flex: 1;
}

.custom-optgroup {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ocean-blue);
    background: #f0f9ff;
    position: sticky;
    top: 0;
}

.custom-option {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--midnight-blue);
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f1f5f9;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover, .custom-option.selected {
    background: #e0f2fe;
}

.custom-select-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 90;
    backdrop-filter: blur(2px);
}

/* Mobile Bottom Sheet */
@media (max-width: 600px) {
    .custom-select-panel {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        z-index: 100;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
        display: flex !important; /* always block but translate out */
    }

    .custom-dropdown-group.open .custom-select-panel {
        transform: translateY(0);
    }
    
    .custom-dropdown-group:not(.open) .custom-select-panel {
        /* Keep it off-screen when closed on mobile to preserve transition */
        visibility: hidden;
    }
    
    .custom-dropdown-group.open .custom-select-panel {
        visibility: visible;
    }

    .custom-dropdown-group.open .custom-select-overlay {
        display: block;
    }

    .close-panel-btn {
        display: block;
    }
    
    .custom-select-search {
        padding: 15px;
    }
    
    .custom-option {
        padding: 15px 16px;
        font-size: 15px;
    }
}
