/**
 * Estilos Frontend - Calculadora de Ingredientes
 * 
 * @package Entregalo_Calculadora_Pro
 * @since 1.0.0
 */

/* ========================================
   CONTAINER PRINCIPAL
======================================== */
.ecp-calculadora-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
   CARDS Y SECCIONES
======================================== */
.ecp-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.ecp-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.ecp-description {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 25px;
}

/* ========================================
   UPLOAD DE ARCHIVOS
======================================== */
.ecp-file-input-wrapper {
    margin-bottom: 20px;
}

.ecp-file-input-wrapper input[type="file"] {
    display: none;
}

.ecp-file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ecf0f1;
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #34495e;
}

.ecp-file-label:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
}

.ecp-file-label .ecp-icon {
    font-size: 20px;
}

.ecp-filename {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
}

/* ========================================
   BOTONES
======================================== */
.ecp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ecp-btn-primary {
    background: #3498db;
    color: #ffffff;
}

.ecp-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.ecp-btn-secondary {
    background: #95a5a6;
    color: #ffffff;
}

.ecp-btn-secondary:hover {
    background: #7f8c8d;
}

.ecp-btn-export {
    background: #27ae60;
    color: #ffffff;
    margin: 5px;
}

.ecp-btn-export:hover {
    background: #229954;
    transform: translateY(-2px);
}

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

.ecp-spinner {
    animation: spin 1s linear infinite;
}

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

/* ========================================
   MENSAJES
======================================== */
.ecp-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.ecp-message.error {
    background: #ffe6e6;
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.ecp-message.success {
    background: #d5f5e3;
    color: #1e8449;
    border-left: 4px solid #27ae60;
}

.ecp-message.info {
    background: #d6eaf8;
    color: #1a5490;
    border-left: 4px solid #3498db;
}

/* ========================================
   SECCIÓN DE RESULTADOS
======================================== */
.ecp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ecp-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #34495e;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* ========================================
   TARJETAS DE RECETAS
======================================== */
.ecp-receta-card {
    background: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ecp-receta-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: #ffffff;
}

.ecp-receta-nombre {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.ecp-pesos-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    opacity: 0.95;
}

.ecp-peso-preparacion strong {
    font-size: 15px;
    color: #ffeaa7;
}

.ecp-peso-terminado strong {
    font-size: 15px;
    color: #55efc4;
}

.ecp-receta-body {
    padding: 20px;
}

/* ========================================
   TABLAS
======================================== */
.ecp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ecp-table thead {
    background: #34495e;
    color: #ffffff;
}

.ecp-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecp-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.ecp-table tbody tr:hover {
    background: #f8f9fa;
}

.ecp-table tbody td {
    padding: 12px;
}

.ecp-cantidad {
    font-weight: 700;
    color: #2980b9;
    font-size: 15px;
}

.ecp-cantidad-total {
    color: #e74c3c;
    font-size: 16px;
}

.ecp-categoria {
    color: #7f8c8d;
    font-size: 13px;
}

/* ========================================
   SUMATORIO
======================================== */
.ecp-sumatorio-card {
    background: #fffbea;
    border: 2px solid #ffd93d;
    border-radius: 8px;
    padding: 20px;
}

.ecp-table-sumatorio thead {
    background: #f39c12;
}

/* ========================================
   SEPARADOR
======================================== */
.ecp-separator {
    height: 2px;
    background: linear-gradient(90deg, transparent, #bdc3c7, transparent);
    margin: 40px 0;
}

/* ========================================
   BOTONES DE EXPORTACIÓN
======================================== */
.ecp-export-actions {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ecp-export-actions h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.ecp-export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .ecp-calculadora-container {
        padding: 15px;
    }
    
    .ecp-card {
        padding: 20px;
    }
    
    .ecp-title {
        font-size: 20px;
    }
    
    .ecp-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ecp-export-buttons {
        flex-direction: column;
    }
    
    .ecp-btn-export {
        width: 100%;
        margin: 5px 0;
    }
    
    .ecp-table {
        font-size: 12px;
    }
    
    .ecp-table thead th,
    .ecp-table tbody td {
        padding: 8px;
    }
}

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

.ecp-results-section {
    animation: fadeIn 0.5s ease;
}

.ecp-receta-card {
    animation: fadeIn 0.3s ease;
}
