/**
 * Estilos del Cotizador Frontend
 */

.cotizador-inmobiliario-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.cotizador-header {
    text-align: center;
    margin-bottom: 40px;
}

.cotizador-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.cotizador-subtitle {
    font-size: 16px;
    color: #64748b;
}

/* Formulario */
.cotizador-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Tipo de Operación - DESTACADA */
.operacion-destacada {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.operacion-destacada .cotizador-form-group {
    width: 100%;
}

.operacion-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.operacion-btn {
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.operacion-btn:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    transform: translateY(-2px);
}

.operacion-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-color: #1e40af;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.operacion-icon {
    font-size: 32px;
}

.operacion-text {
    font-size: 18px;
}

/* Rows del formulario */
.cotizador-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.cotizador-form-row.full-width {
    grid-template-columns: 1fr;
}

@media (max-width: 768px) {
    .cotizador-form-row {
        grid-template-columns: 1fr;
    }
    
    .operacion-buttons {
        grid-template-columns: 1fr;
    }
}

.cotizador-form-group {
    display: flex;
    flex-direction: column;
}

.cotizador-form-group.full-width {
    grid-column: 1 / -1;
}

.cotizador-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-icon {
    font-size: 18px;
}

.cotizador-form-group select,
.cotizador-form-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.cotizador-form-group select:focus,
.cotizador-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cotizador-form-group select:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.loading-zonas {
    font-size: 12px;
    color: #3b82f6;
    margin-top: 4px;
}

.metros-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Resultado */
.cotizador-resultado {
    margin-top: 40px;
}

.resultado-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.resultado-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.resultado-header h3 {
    color: white;
    font-size: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resultado-operacion-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resultado-operacion-badge.badge-venta {
    background: rgba(59, 130, 246, 0.9);
}

.resultado-operacion-badge.badge-alquiler {
    background: rgba(251, 146, 60, 0.9);
}

.resultado-body {
    padding: 30px;
    background: white;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.resultado-label {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

.resultado-valor {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.resultado-divider {
    margin: 20px 0;
    border-top: 2px dashed #e5e7eb;
}

.resultado-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-top: 10px;
}

.resultado-label-total {
    font-size: 18px;
    color: #92400e;
    font-weight: 700;
}

.resultado-valor-total {
    font-size: 32px;
    font-weight: 800;
    color: #92400e;
}

.resultado-footer {
    padding: 20px 30px;
    background: #f9fafb;
}

.resultado-disclaimer {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Loading */
.cotizador-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cotizador-loading p {
    color: #64748b;
    font-size: 16px;
}

/* Error */
.cotizador-error {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 20px 30px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.error-icon {
    font-size: 32px;
}

.error-message {
    color: #991b1b;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .cotizador-inmobiliario-container {
        padding: 15px;
    }
    
    .cotizador-form {
        padding: 25px;
    }
    
    .cotizador-title {
        font-size: 24px;
    }
    
    .resultado-valor-total {
        font-size: 24px;
    }
    
    .resultado-header {
        flex-direction: column;
        text-align: center;
    }
    
    .resultado-header h3 {
        font-size: 20px;
    }
    
    .operacion-icon {
        font-size: 24px;
    }
    
    .operacion-text {
        font-size: 16px;
    }
}

/* Animaciones suaves */
.cotizador-resultado {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}