<?php
/**
 * Archivo CSS público para el plugin Tang RXD.
 *
 * @link       https://tangerine.solutions/
 * @since      1.0.0
 *
 * @package    Tang_RXD
 * @subpackage Tang_RXD/public/css
 */

/* Estilos generales */
:root {
    --primary-color: #f28500;
    --secondary-color: #ff9c4a;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-radius: 10px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tang-rxd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Arial', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Encabezado */
.tang-rxd-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.tang-rxd-logo-circle {
    width: 100px;
    height: 100px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    box-shadow: var(--box-shadow);
}

/* Tarjetas de estadísticas */
.tang-rxd-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tang-rxd-stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.tang-rxd-stat-card:hover {
    transform: translateY(-5px);
}

.tang-rxd-stat-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.tang-rxd-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.tang-rxd-stat-subvalue {
    font-size: 14px;
    color: #888;
}

/* Botón de exportar */
.tang-rxd-export-button {
    margin: 10px 0;
}

.tang-rxd-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.tang-rxd-button:hover {
    background-color: var(--secondary-color);
}

/* Gráficos */
.tang-rxd-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tang-rxd-chart-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.tang-rxd-chart-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.tang-rxd-chart {
    height: 300px;
}

/* Tabla de máquinas */
.tang-rxd-machines {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.tang-rxd-machines-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tang-rxd-machines-table {
    width: 100%;
    border-collapse: collapse;
}

.tang-rxd-machines-table th {
    background-color: var(--primary-color);
    color: white;
    text-align: left;
    padding: 12px 15px;
}

.tang-rxd-machines-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.tang-rxd-machines-table tr:hover {
    background-color: #f5f5f5;
}

.tang-rxd-machine-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.tang-rxd-machine-active {
    background-color: #4CAF50;
}

.tang-rxd-machine-inactive {
    background-color: #F44336;
}

/* Proyecciones */
.tang-rxd-projections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tang-rxd-projection-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.tang-rxd-projection-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.tang-rxd-projection-value {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.tang-rxd-projection-subvalue {
    font-size: 14px;
    color: #888;
}

/* Modal para mensajes */
.tang-rxd-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.tang-rxd-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.tang-rxd-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.tang-rxd-modal-close:hover,
.tang-rxd-modal-close:focus {
    color: black;
    text-decoration: none;
}

.tang-rxd-modal-title {
    margin-top: 0;
    color: var(--primary-color);
}

.tang-rxd-modal-message {
    margin-bottom: 20px;
}

.tang-rxd-modal-actions {
    text-align: right;
}

/* Responsividad */
@media (max-width: 768px) {
    .tang-rxd-charts {
        grid-template-columns: 1fr;
    }
    
    .tang-rxd-machines-table {
        display: block;
        overflow-x: auto;
    }
}


/* Estilos para mensajes de error del shortcode */
.tang-aleo-error {
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.tang-aleo-error::before {
    content: "⚠";
    color: #d32f2f;
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tang-aleo-error {
        font-size: 13px;
        padding: 10px 12px;
        margin: 12px 0;
    }
}

.tang-aleo-error.critical {
    background-color: #ffebee;
    border-color: #f44336;
    color: #b71c1c;
}

.tang-aleo-error.critical::before {
    content: "🚨";
    color: #b71c1c;
}