/**
 * Estilos del Proceso de Datos (Pasos)
 * Complementa al configurador
 * 
 * @package ContratacionOnline
 */

/* ========================================
   WRAPPER PRINCIPAL
======================================== */

.proceso-contratacion-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
   BARRA DE PROGRESO
======================================== */

.barra-progreso-container {
    background: white;
    border-radius: 16px;
    padding: 30px 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.barra-progreso {
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.barra-progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #2474C8 0%, #2474C8 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.barra-progreso-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.indicador-paso {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2474C8;
}

/* ========================================
   LAYOUT 2 COLUMNAS
======================================== */

.proceso-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1200px) {
    .proceso-layout {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .proceso-layout {
        grid-template-columns: 1fr;
    }
    
    .carrito-sidebar-container {
        order: -1;
    }
}

/* ========================================
   PASOS
======================================== */

.paso-contratacion {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.5s ease;
}

.paso-contratacion.active {
    display: block;
}

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

.paso-titulo {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.paso-descripcion {
    font-size: 18px;
    color: #666;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

/* ========================================
   FORMULARIOS
======================================== */

.formulario-paso {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.form-group label .required {
    color: #ff4444;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2474C8;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #ff4444;
    background: #fff5f5;
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-help {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}

.error-message {
    display: block;
    color: #ff4444;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

/* Grid de formularios */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Radio y Checkbox */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-item:hover,
.checkbox-item:hover {
    border-color: #2474C8;
    background: rgba(102, 126, 234, 0.05);
}

.radio-item input[type="radio"],
.checkbox-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #2474C8;
}

.radio-item label,
.checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

/* ========================================
   BOTONES DE NAVEGACIÓN
======================================== */

.botones-navegacion {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-siguiente,
.btn-finalizar {
    background: linear-gradient(135deg, #2474C8 0%, #2474C8 100%);
    color: white;
    margin-left: auto;
}

.btn-siguiente:hover:not(:disabled),
.btn-finalizar:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-anterior {
    background: white;
    color: #2474C8;
    border: 2px solid #2474C8;
}

.btn-anterior:hover {
    background: #2474C8;
    color: white;
}

@media (max-width: 768px) {
    .botones-navegacion {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-siguiente,
    .btn-finalizar {
        margin-left: 0;
    }
}

/* ========================================
   CARRITO SIDEBAR
======================================== */

.carrito-sidebar-container {
    position: sticky;
    top: 20px;
}

.carrito-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.carrito-header {
    background: linear-gradient(135deg, #2474C8 0%, #2474C8 100%);
    color: white;
    padding: 25px;
}

.carrito-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
}

.items-count {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.carrito-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.carrito-body::-webkit-scrollbar {
    width: 8px;
}

.carrito-body::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.carrito-body::-webkit-scrollbar-thumb {
    background: #2474C8;
    border-radius: 10px;
}

.carrito-item {
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.carrito-item:hover {
    border-color: #2474C8;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.carrito-item.tarifa-principal {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 100%);
    border-color: #2474C8;
}

.carrito-item h4,
.carrito-item h5 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.item-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.item-price .price {
    font-size: 24px;
    font-weight: 700;
    color: #2474C8;
}

.item-price .period {
    font-size: 14px;
    color: #999;
}

.carrito-footer {
    padding: 25px;
    background: #f9f9f9;
    border-top: 2px solid #e0e0e0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
    color: #666;
}

.total-row.total-final {
    border-top: 3px solid #e0e0e0;
    margin-top: 15px;
    padding-top: 20px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.total-row.total-final .value {
    color: #2474C8;
}

/* ========================================
   ALERTAS
======================================== */

.alert {
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid;
    font-size: 15px;
    line-height: 1.6;
}

.alert-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.alert-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.alert-danger {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* ========================================
   RESUMEN FINAL
======================================== */

.resumen-seccion {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
}

.resumen-seccion h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 3px solid #2474C8;
}

.resumen-campo {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.resumen-campo:last-child {
    border-bottom: none;
}

.resumen-campo .label {
    color: #666;
    font-weight: 600;
}

.resumen-campo .value {
    color: #333;
    font-weight: 500;
}

/* ========================================
   LOADING Y NOTIFICACIONES
======================================== */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
}

.loading-content p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2474C8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

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

.notificacion {
    position: fixed;
    top: 20px;
    right: -400px;
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 320px;
    max-width: 450px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notificacion.show {
    right: 20px;
}

.notificacion-exito {
    border-left: 5px solid #4caf50;
}

.notificacion-error {
    border-left: 5px solid #ff4444;
}

.btn-cerrar-notif {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    transition: color 0.3s;
}

.btn-cerrar-notif:hover {
    color: #333;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1024px) {
    .proceso-contratacion-wrapper {
        padding: 30px 15px;
    }
    
    .paso-contratacion {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .barra-progreso-container {
        padding: 20px 25px;
    }
    
    .paso-contratacion {
        padding: 30px 20px;
    }
    
    .paso-titulo {
        font-size: 26px;
    }
    
    .paso-descripcion {
        font-size: 16px;
    }
    
    .carrito-sidebar-container {
        position: static;
    }
}

@media (max-width: 480px) {
    .proceso-contratacion-wrapper {
        padding: 20px 10px;
    }
    
    .barra-progreso-container {
        padding: 15px 20px;
    }
    
    .paso-contratacion {
        padding: 25px 15px;
    }
    
    .paso-titulo {
        font-size: 22px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .btn {
        padding: 14px 30px;
        font-size: 16px;
    }
}

/* ========================================
   UTILIDADES
======================================== */

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}