.application-section {
    background: #fff;
    padding: 2rem 0;
    position: relative;
}

#form-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 16, 29, 0.75);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#form-loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.progress-steps-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    width: 100%;
    position: relative;
}

.progress-step {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

/* Los conectores deben posicionarse respecto al contenedor padre */
.progress-step .step-connector {
    position: absolute;
}

.progress-step:first-child {
    justify-content: flex-start;
}

.progress-step:nth-child(2) {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.progress-step:last-child {
    justify-content: flex-end;
    margin-left: auto;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    background: #f5f5f5;
    color: #ccc;
    border: 2px solid #f5f5f5;
}

.step-circle.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.step-circle.completed {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
}

.step-circle.completed i {
    font-size: 0.75rem;
}

.step-label {
    margin-left: 0.75rem;
    font-weight: 500;
    color: #ccc;
    font-size: 0.9375rem;
}

.progress-step.active .step-label {
    color: #000;
}

.progress-step.completed .step-label {
    color: #0d9488;
}

.step-connector {
    height: 3px;
    background: #f5f5f5;
    position: absolute;
    top: 16px;
    z-index: 1;
    display: none;
}

/* Los conectores se posicionarán dinámicamente con JavaScript */
#connector-1-2,
#connector-2-3 {
    display: none;
}

.progress-step:last-child .step-connector {
    display: none;
}

.step-connector.completed {
    background: #0d9488;
    height: 3px;
}

.step-connector.half-completed {
    background: linear-gradient(to right, #0d9488 50%, #f5f5f5 50%);
    height: 3px;
}

.application-section .content-box {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
    max-width: none !important;
    width: 100%;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.traveler-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 1rem;
    background: #f5f5f5;
    overflow: hidden;
    transition: background 0.3s ease;
}

.traveler-section.expanded {
    background: #fff;
}

.traveler-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 8px;
    transition: border-radius 0.3s ease;
}

.traveler-section.expanded .traveler-header {
    border-radius: 8px 8px 0 0;
}

.traveler-header h5 {
    margin: 0;
    color: #1890ff;
}

.traveler-content {
    display: block;
    padding: 1.5rem;
    background: #fff;
}

.traveler-content.collapsed {
    display: none;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-control.error,
select.form-control.error {
    border-color: #ff4d4f;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.form-control.error:focus,
select.form-control.error:focus {
    border-color: #ff4d4f;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

/* Estilos para Select2 con error */
.select2-container--bootstrap-5 .select2-selection.error,
.select2-container--bootstrap-5.select2-container--error .select2-selection {
    border-color: #ff4d4f !important;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2) !important;
}

/* Evitar que los inputs en pasos no activos se marquen como inválidos */
.form-step:not(.active) .form-control:invalid {
    border-color: #d9d9d9;
    box-shadow: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.order-summary-sidebar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
} 

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-outline {
    background: transparent;
    border: 1px solid #1890ff;
    color: #1890ff;
}

.btn-outline:hover {
    background: #1890ff;
    color: #fff;
}

.btn-badge {
    background: #e3f2fd;
    border: none;
    border-radius: 20px;
    padding: 0.625rem 1.25rem;
    color: #1976d2;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-badge:hover {
    background: #bbdefb;
    color: #1565c0;
}

.btn-badge-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1976d2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.order-summary {
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0;
}

.order-summary-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.payment-body {
    background: transparent !important;
}

.order-summary h5 {
    margin-bottom: 1rem;
    color: #333;
}

.order-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.order-row:last-child {
    border-bottom: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.error-message {
    color: #ff4d4f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.text-danger {
    color: #ff4d4f;
}

.summary-section {
    margin-bottom: 1.5rem;
}

.summary-section h6 {
    color: #1890ff;
    margin-bottom: 0.5rem;
}

.processing-option {
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.processing-option:hover {
    background-color: #f8f9fa;
}

.processing-option .form-check-input {
    cursor: pointer;
}

.processing-option .form-check-label {
    cursor: pointer;
}

/* Fast badge background and text color - always */
#processing_fast ~ .form-check-label .badge.bg-info,
#processing_fast:checked ~ .form-check-label .badge.bg-info {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

/* Ultra Premium badge background and text color - always */
#processing_ultra ~ .form-check-label .badge.bg-warning,
#processing_ultra:checked ~ .form-check-label .badge.bg-warning {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

/* Fast option selected */
.processing-option:has(#processing_fast:checked) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-color: #1890ff !important;
    border-width: 2px !important;
}
#processing_fast:checked ~ .form-check-label strong {
    color: #28a745 !important;
}
#processing_fast:checked ~ .form-check-label strong.text-primary,
#processing_fast:checked ~ .form-check-label .text-end strong {
    color: #1890ff !important;
}

/* Ultra Premium option selected */
.processing-option:has(#processing_ultra:checked) {
    background-color: #fff3cd !important;
    border-color: #ff9800 !important;
    border-width: 2px !important;
}
#processing_ultra:checked ~ .form-check-label strong {
    color: #28a745 !important;
}
#processing_ultra:checked ~ .form-check-label .text-end strong {
    color: #ff9800 !important;
}

/* Standard option - selected (only bold border, no background) */
.processing-option:has(#processing-standard:checked) {
    background-color: #fff !important;
    border-color: #000 !important;
    border-width: 2px !important;
}

#processing-standard:checked ~ .form-check-label strong {
    color: #000 !important;
}

/* Fast option - selected (blue background and border) */
.processing-option:has(#processing-fast:checked) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-color: #1890ff !important;
    border-width: 2px !important;
}

#processing-fast:checked ~ .form-check-label strong {
    color: #1890ff !important;
}

/* Ultra Premium option - selected (orange background and border) */
.processing-option:has(#processing-ultra-premium:checked) {
    background-color: #fff3cd !important;
    border-color: #ff9800 !important;
    border-width: 2px !important;
}

#processing-ultra-premium:checked ~ .form-check-label strong {
    color: #ff9800 !important;
}

/* Reset styles when not selected */
.processing-option:not(:has(input:checked)) {
    background-color: #fff !important;
    border-color: #dee2e6 !important;
    border-width: 1px !important;
}

.summary-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.summary-traveler-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Sidebar móvil fijo en la parte inferior - solo visible por debajo de XL (1200px) */
.mobile-bottom-sidebar {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Mobile view: less than 1200px (XL breakpoint) */
@media (max-width: 1199.98px) {
    /* Ocultar indicador de progreso en mobile */
    .progress-steps-horizontal {
        display: none !important;
    }
    
    .form-step .row:not(.g-2) {
        flex-direction: column;
    }
    
    .form-step .col-lg-8,
    .form-step .col-lg-4 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Ocultar sidebar derecho en pasos 1, 2 y 3 */
    #step-1 .col-lg-4,
    #step-2 .col-lg-4,
    #step-3 .col-lg-4 {
        display: none;
    }
    
    /* Ocultar botón del paso 1 en responsive (ya aparece en mobile sidebar) */
    #step-1-form-actions {
        display: none;
    }
    
    .order-summary-sidebar {
        position: relative !important;
        top: 0 !important;
        margin-top: 2rem;
    }
    
    /* Mostrar sidebar móvil solo por debajo de XL y solo en pasos 1, 2 y 3 */
    .mobile-bottom-sidebar {
        display: block !important;
    }
    
    /* Ocultar sidebar móvil en el paso 4 (Checkout) */
    #step-4.active ~ .mobile-bottom-sidebar,
    .step-4-active .mobile-bottom-sidebar {
        display: none !important;
    }
    
    /* Añadir padding inferior al body para que el contenido no quede oculto cuando el sidebar móvil está visible */
    .application-section.mobile-sidebar-visible {
        padding-bottom: 100px;
    }
    
    /* Quitar padding cuando el sidebar móvil está oculto (paso 4) */
    .step-4-active .application-section {
        padding-bottom: 0 !important;
    }
    
    /* Evitar scroll innecesario */
    body {
        overflow-x: hidden;
    }
}
    
.progress-steps-horizontal {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.step-connector {
    display: none;
}

.progress-step {
    max-width: none;
    flex: 0 0 auto;
}