/**
 * Frontend CSS for Infinita Booking System
 */

.infinita-booking-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.booking-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.booking-form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.booking-form-header h3 {
    color: #1e293b;
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.booking-form-header p {
    color: #64748b;
    font-size: 18px;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.booking-step {
    display: none;
    background: #ffffff;
    padding: 40px;
    border-radius: 0;
    margin-bottom: 0;
    border: none;
    min-height: 500px;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.booking-step h4 {
    color: #1e293b;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    position: relative;
    padding-bottom: 16px;
}

.booking-step h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

/* Category Selection */
.category-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.category-option input[type="radio"] {
    display: none;
}

.category-card {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
}

.category-card:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.category-option input[type="radio"]:checked + .category-card {
    border-color: #0073aa;
    background-color: #f0f8ff;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.category-card h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.category-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Package Selection - Force visibility for Elementor compatibility */
.infinita-booking-form .package-selection,
.package-selection {
    margin-bottom: 30px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.infinita-booking-form .package-selection label,
.package-selection label {
    display: block !important;
    margin-bottom: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 16px !important;
    letter-spacing: -0.01em !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.infinita-booking-form .package-selection select,
.package-selection select {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 18px 20px !important;
    padding-right: 50px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 20px center !important;
    background-size: 14px !important;
    color: #1e293b !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 64px !important;
    line-height: 1.5 !important;
}

.infinita-booking-form .package-selection select:hover,
.package-selection select:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
}

.infinita-booking-form .package-selection select:focus,
.package-selection select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.infinita-booking-form .package-selection select option,
.package-selection select option {
    padding: 12px 20px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    font-weight: 500 !important;
    display: block !important;
}

.infinita-booking-form .package-selection select option:first-child,
.package-selection select option:first-child {
    color: #94a3b8 !important;
    font-style: italic !important;
}

.infinita-booking-form .package-selection select:invalid,
.package-selection select:invalid {
    color: #94a3b8 !important;
}

.package-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.package-details p {
    margin-bottom: 8px;
    color: #555;
}

.package-details strong {
    color: #333;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    color: #1f2937;
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    background-color: #fef2f2;
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Vehicle Selection */
.vehicle-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.vehicle-option {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.vehicle-option:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.vehicle-option.selected {
    border-color: #0073aa;
    background-color: #f0f8ff;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vehicle-header h5 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.vehicle-price {
    color: #0073aa;
    font-size: 20px;
    font-weight: bold;
}

.vehicle-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.vehicle-details strong {
    color: #333;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

.step-error {
    margin-bottom: 20px;
}

/* Booking Summary */
.booking-summary {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-summary h5 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.summary-details p {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.summary-details strong {
    color: #333;
    font-weight: 600;
}

.summary-details span {
    color: #666;
    font-weight: normal;
}

/* Terms Section */
.terms-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.terms-section label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.terms-section input[type="checkbox"] {
    margin: 0;
    width: auto;
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-section a {
    color: #0073aa;
    text-decoration: none;
}

.terms-section a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f1f5f9;
    gap: 16px;
}

.btn-next,
.btn-prev,
.btn-submit {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-next:hover,
.btn-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-prev {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-prev:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #374151;
}

.btn-next:disabled,
.btn-submit:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success and Error Messages */
.booking-success {
    background-color: #d4edda;
    color: #155724;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #c3e6cb;
    margin: 20px 0;
}

.booking-success h4 {
    margin: 0 0 15px 0;
    color: #155724;
    font-size: 20px;
    font-weight: 600;
}

.booking-success p {
    margin: 10px 0;
    font-size: 14px;
}

.booking-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.booking-error h4 {
    margin: 0 0 15px 0;
    color: #721c24;
    font-size: 20px;
    font-weight: 600;
}

.booking-error p {
    margin: 10px 0;
    font-size: 14px;
}

/* Capacity Suggestions */
.capacity-suggestions {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.capacity-suggestions h5 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 16px;
}

.suggestion-item {
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .infinita-booking-form {
        margin: 10px;
        border-radius: 12px;
    }
    
    .booking-form-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .booking-form-header h3 {
        font-size: 28px;
    }
    
    .booking-form-header p {
        font-size: 16px;
    }
    
    .booking-step {
        padding: 30px 20px;
        min-height: 400px;
    }
    
    .booking-step h4 {
        font-size: 20px;
        margin-bottom: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-selection {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .vehicle-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 16px;
        margin-top: 30px;
        padding-top: 24px;
    }
    
    .btn-next,
    .btn-prev,
    .btn-submit {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .vehicle-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Google Maps Integration Styles */
.location-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    transition: all 0.2s;
}

.location-input-wrapper.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.location-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.pickup-icon {
    background: #00B14F;
}

.dropoff-icon {
    background: #FF5722;
}

.input-container {
    flex: 1;
    position: relative;
}

.location-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
    padding: 0;
}

.location-input::placeholder {
    color: #94a3b8;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid #e2e8f0;
}

.autocomplete-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

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

.suggestion-item:hover,
.suggestion-item:active {
    background-color: #f8fafc;
}

.suggestion-icon {
    width: 20px;
    height: 20px;
    color: #64748b;
    flex-shrink: 0;
    font-size: 16px;
}

.suggestion-text {
    flex: 1;
    color: #1e293b;
    font-size: 15px;
}

/* Route Map Container */
.route-map-container {
    margin-top: 24px;
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Add gap after route map container for pickup date/time row */
.route-map-container + .form-row {
    margin-top: 24px;
}

.route-info-card {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.route-info-header {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.route-details {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.route-detail-item {
    flex: 1;
}

.route-detail-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.route-detail-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.route-addresses {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.route-address {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.route-address:last-child {
    margin-bottom: 0;
}

.route-address-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin-top: 2px;
}

.route-address-text {
    flex: 1;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.route-map {
    width: 100%;
    height: 400px;
    min-height: 400px;
}

@media (max-width: 768px) {
    .route-map {
        height: 300px;
        min-height: 300px;
    }
    
    .route-details {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .infinita-booking-form {
        margin: 5px;
        border-radius: 8px;
    }
    
    .booking-form-header {
        padding: 24px 16px;
        margin-bottom: 24px;
    }
    
    .booking-form-header h3 {
        font-size: 24px;
    }
    
    .booking-form-header p {
        font-size: 14px;
    }
    
    .booking-step {
        padding: 24px 16px;
        min-height: 350px;
    }
    
    .booking-step h4 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .category-card {
        padding: 16px;
    }
    
    .vehicle-option {
        padding: 16px;
    }
    
    .btn-next,
    .btn-prev,
    .btn-submit {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Shortcode Styles */
.infinita-booking-shortcode {
    margin: 20px 0;
}

.infinita-booking-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.infinita-booking-button:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
    text-decoration: none;
    color: white;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }

.p-15 { padding: 15px; }
.p-20 { padding: 20px; }

.hidden { display: none !important; }
.visible { display: block !important; }
