/* Scoped Booking Modal Styles */
#vf-booking-section {
    --vf-primary-orange: #FF4500;
    --vf-primary-hover: #E63E00;
    --vf-whatsapp-green: #25D366;
    --vf-whatsapp-hover: #128C7E;
    --vf-text-main: #1f2937;
    --vf-text-muted: #6b7280;
    --vf-bg-gray: #f3f4f6;
    --vf-white: #ffffff;
    --vf-border: #e5e7eb;
    --vf-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--vf-text-main);
}

#vf-booking-section * {
    box-sizing: border-box;
}

/* Fixed Scoped Modal */
#vf-booking-section .vf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#vf-booking-section .vf-modal.active {
    display: flex;
}

#vf-booking-section .vf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#vf-booking-section .vf-modal-container {
    position: relative;
    background: var(--vf-white);
    width: 100%;
    max-width: 520px;
    border-radius: 2rem;
    overflow: visible;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: vfModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

@keyframes vfModalPop {
    from { transform: scale(0.9) translateY(30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

#vf-booking-section .vf-modal-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}

#vf-booking-section .vf-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: var(--vf-text-main);
    line-height: 1.2;
}

#vf-booking-section .vf-activity-indicator {
    color: var(--vf-primary-orange);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

#vf-booking-section .vf-close-modal {
    background: var(--vf-bg-gray);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    color: var(--vf-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#vf-booking-section .vf-modal-body {
    padding: 2rem;
    max-height: none;
    overflow: visible;
}

#vf-booking-section .vf-form-group {
    margin-bottom: 1.25rem;
}

#vf-booking-section .vf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#vf-booking-section label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--vf-text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#vf-booking-section input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--vf-border);
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fafafa;
}

#vf-booking-section input:focus {
    outline: none;
    border-color: var(--vf-primary-orange);
    background: var(--vf-white);
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

#vf-booking-section .vf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    border-radius: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

#vf-booking-section .vf-btn-primary {
    background-color: var(--vf-primary-orange);
    color: var(--vf-white);
}

#vf-booking-section .vf-btn-primary:hover {
    background-color: var(--vf-primary-hover);
    transform: translateY(-2px);
}

#vf-booking-section .vf-btn-whatsapp {
    background-color: var(--vf-whatsapp-green);
    color: var(--vf-white);
    gap: 0.75rem;
    font-size: 1rem;
    text-transform: none;
    margin-top: 1.5rem;
    letter-spacing: normal;
}

#vf-booking-section .vf-btn-whatsapp:hover {
    background-color: var(--vf-whatsapp-hover);
}

/* Success State */
#vf-booking-section .vf-success-state {
    text-align: center;
    padding: 2rem;
    display: none;
}

#vf-booking-section .vf-success-state.active {
    display: block;
}

#vf-booking-section .vf-check-icon {
    width: 70px;
    height: 70px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.25rem;
}

#vf-booking-section .vf-success-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

#vf-booking-section .vf-success-text {
    color: var(--vf-text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

#vf-booking-section .vf-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 1.5rem 0;
}

#vf-booking-section .vf-whatsapp-prompt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--vf-text-muted);
    margin-bottom: 0.5rem;
}

#vf-booking-section .vf-back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--vf-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 480px) {
    #vf-booking-section .vf-form-row {
        grid-template-columns: 1fr;
    }
    #vf-booking-section .vf-modal-body {
        padding: 1.5rem;
    }
    #vf-booking-section .vf-modal-header {
        padding: 1rem 1.5rem;
    }
}

/* ===== Country Code Picker ===== */
#vf-booking-section .vf-phone-wrap {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: stretch !important;
    width: 100% !important;
    border: 1px solid var(--vf-border) !important;
    border-radius: 0.75rem !important;
    background: #fafafa !important;
    overflow: visible !important;
    transition: all 0.2s;
    position: relative;
}

#vf-booking-section .vf-phone-wrap:focus-within {
    border-color: var(--vf-primary-orange) !important;
    background: var(--vf-white) !important;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1) !important;
}

#vf-booking-section .vf-phone-wrap > input[type="tel"],
#vf-booking-section .vf-phone-wrap > input#vfPhoneInput {
    grid-column: 2;
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    border: none !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
    cursor: text !important;
}

#vf-booking-section input[type="hidden"] {
    display: none !important;
}

/* Simplified Picker Container */
#vf-booking-section .vf-country-picker {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    min-width: max-content;
    z-index: 2;
}

#vf-booking-section .vf-country-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    border: none !important;
    border-right: 1px solid var(--vf-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--vf-text-main);
    cursor: pointer;
    float: none !important;
    width: auto !important;
    min-width: 96px;
    margin: 0 !important;
    transition: all 0.2s;
    height: 100%;
    white-space: nowrap;
    position: relative;
    z-index: 1 !important;
}

#vf-booking-section .vf-country-btn:hover {
    background: #f0f0f0;
}

#vf-booking-section .vf-country-btn svg {
    color: var(--vf-text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

#vf-booking-section .vf-country-flag {
    font-size: 1.1rem;
    line-height: 1;
}

#vf-booking-section .vf-country-code {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--vf-text-main);
}

/* Dropdown - Fixed relative to the entire wrapper */
#vf-booking-section .vf-country-dropdown {
    position: absolute;
    top: auto;
    bottom: calc(100% + 8px);
    left: 0;
    width: 320px;
    min-width: 100%;
    max-width: calc(100vw - 2rem);
    max-height: 0;
    overflow: hidden;
    background: var(--vf-white);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
    z-index: 1000 !important; /* Always on top when active */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

#vf-booking-section .vf-country-dropdown.open {
    max-height: 320px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    border: 1px solid var(--vf-border);
}

#vf-booking-section .vf-country-search-wrap {
    padding: 0.75rem;
    border-bottom: 1px solid var(--vf-border);
    position: sticky;
    top: 0;
    background: var(--vf-white);
    z-index: 1;
}

#vf-booking-section .vf-country-search {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--vf-border);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fafafa;
}

#vf-booking-section .vf-country-search:focus {
    outline: none;
    border-color: var(--vf-primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.08);
    background: var(--vf-white);
}

#vf-booking-section .vf-country-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
}

#vf-booking-section .vf-country-list::-webkit-scrollbar {
    width: 4px;
}

#vf-booking-section .vf-country-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

#vf-booking-section .vf-country-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.85rem;
}

#vf-booking-section .vf-country-option:hover {
    background: #f9fafb;
}

#vf-booking-section .vf-country-option.selected {
    background: #fff7ed;
}

#vf-booking-section .vf-co-flag {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

#vf-booking-section .vf-co-name {
    flex: 1;
    color: var(--vf-text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#vf-booking-section .vf-co-code {
    color: var(--vf-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    #vf-booking-section .vf-country-dropdown {
        width: 100%;
        max-width: none;
    }
}
