/**
 * VTC Booking Form - Modern Floating Design
 * Floating form over interactive map with premium UI/UX
 */

/* ===========================================
   VTC PLUGIN CSS SCOPING
   ALL styles are scoped to VTC elements only
   =========================================== */

/* This CSS file contains NO global selectors that affect theme elements.
   All VTC styles are prefixed with .vtc- classes to ensure complete isolation.
   The theme's header, footer, and all other elements remain completely unaffected. */

/* Reset & Base */
.vtc-modern-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    background: transparent;
}

/* Header - Removed */

/* Main Content */
.vtc-modern-main {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: transparent;
}

/* Content Grid */
.vtc-content-grid {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

/* Map Container - Only around content */
.vtc-map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.vtc-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 0.75rem;
}

@media (min-width: 1024px) {
    .vtc-content-grid {
        grid-template-columns: 1fr 1fr;
        padding: 4rem 3rem;
    }
}

/* Hero Text */
.vtc-hero-text {
    position: relative;
    z-index: 10;
    color: white;
}

.vtc-hero-text h1 {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .vtc-hero-text h1 {
        font-size: 3.75rem;
    }
}

.vtc-hero-text p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: white;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 3px 15px rgba(0, 0, 0, 0.4);
}

/* Form Card */
.vtc-form-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 512px;
    margin: 0 auto;
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .vtc-form-card {
        padding: 2rem;
    }
}

/* Service Type Toggle */
.vtc-service-toggle {
    display: flex;
    height: 3rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.vtc-toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vtc-toggle-option input {
    display: none;
}

.vtc-toggle-option.vtc-active,
.vtc-toggle-option:has(input:checked) {
    background: white;
    color: #111827;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.vtc-toggle-option span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Fields */
.vtc-form-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .vtc-form-fields {
        grid-template-columns: 1fr 1fr;
    }
}

.vtc-field-group {
    display: flex;
    flex-direction: column;
}

.vtc-field-group.vtc-full-width {
    grid-column: 1 / -1;
}

.vtc-field-group.vtc-hidden {
    display: none;
}

.vtc-field-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Input with Icon */
.vtc-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.vtc-input-icon-left {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #1f2937;
    pointer-events: none;
    z-index: 2;
}

/* Green geolocation icon for pickup location */
.vtc-input-icon-left.vtc-pickup-icon {
    right: 4.5rem;
}

.vtc-pickup-icon svg {
    filter: drop-shadow(0 1px 2px var(--vtc-primary-rgb-30));
}

.vtc-modern-input {
    width: 100%;
    height: 3.5rem;
    padding: 0 3rem 0 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.5rem;
    color: #1f2937;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

/* Pickup location input has geolocation button, needs more right padding */
.vtc-pickup-input {
    padding-right: 3.5rem;
    padding-left: 1rem;
}

.vtc-modern-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: white !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.vtc-modern-input::placeholder {
    color: #9ca3af;
}


/* Geolocation Icon (clickable) */
.vtc-geolocation-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s;
}

.vtc-geolocation-icon:hover {
    transform: translateY(-50%) scale(1.1);
}

.vtc-geolocation-icon:active {
    transform: translateY(-50%) scale(0.95);
}

.vtc-geolocation-icon svg {
    filter: drop-shadow(0 2px 3px var(--vtc-primary-rgb-30));
}

/* Suggestions Dropdown */
.vtc-suggestions {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.vtc-suggestions.vtc-show {
    display: block;
}

.vtc-suggestion-item {
    padding: 0.875rem 1rem;
    color: #111318;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.vtc-suggestion-item:last-child {
    border-bottom: none;
}

.vtc-suggestion-item:hover {
    background: #f8f9fa;
}

/* Submit Button */
.vtc-modern-submit {
    width: 100%;
    height: 3.5rem;
    background: var(--vtc-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vtc-modern-submit:hover {
    background: var(--vtc-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--vtc-primary-rgb-30);
}

.vtc-modern-submit:active {
    transform: translateY(0);
}

.vtc-modern-submit .vtc-btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.vtc-modern-submit.loading .vtc-btn-text {
    display: none;
}

.vtc-modern-submit.loading .vtc-btn-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Message Styles */
.vtc-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.vtc-message.success {
    background: var(--vtc-primary-rgb-20);
    color: var(--vtc-primary);
    border: 1px solid var(--vtc-primary-rgb-30);
}

.vtc-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Map Styles */
.leaflet-container {
    width: 100%;
    height: 100%;
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {

    /* CRITICAL: Prevent mobile overflow */
    .vtc-modern-wrapper {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: auto !important;
        height: auto !important;
    }

    .vtc-modern-main {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        min-height: auto !important;
    }

    .vtc-content-grid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        gap: 1.5rem !important;
    }

    .vtc-form-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .vtc-hero-text h1 {
        font-size: 1.75rem;
    }

    .vtc-hero-text p {
        font-size: 1rem;
    }

    .vtc-modern-header {
        padding: 1rem;
    }

    .vtc-service-toggle {
        height: 2.5rem;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .vtc-toggle-option {
        font-size: 0.75rem;
        padding: 0 0.25rem;
        flex: 1;
    }

    /* Form fields - full width */
    .vtc-modern-form,
    .vtc-form-fields {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .vtc-field-group,
    .vtc-full-width {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 1rem !important;
    }

    .vtc-modern-input,
    textarea.vtc-modern-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
        /* Prevent iOS zoom */
    }

    .vtc-input-with-icon {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Submit button */
    .vtc-modern-submit {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 1rem !important;
    }
}