/* =====================================================
   HANGAR.CSS — Temporizador y Log de Hangar Ejecutivo
   Star Citizen España (SCESP)
   ===================================================== */

/* Panel del Reloj Principal */
.hangar-dashboard {
    background: rgba(15, 22, 36, 0.45);
    border: 1px solid rgba(67, 237, 248, 0.25);
    border-radius: 14px;
    padding: 50px 30px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

/* Clases dinámicas del contenedor según estado */
.hangar-dashboard.state-open {
    border-color: rgba(40, 167, 69, 0.6);
    box-shadow: 0 0 40px rgba(40, 167, 69, 0.15);
}

.hangar-dashboard.state-closed {
    border-color: rgba(220, 53, 105, 0.6);
    box-shadow: 0 0 40px rgba(220, 53, 105, 0.15);
}

/* Texto de Estado Superior */
.hangar-status-label {
    font-size: 1.4rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.text-open { color: #28a745; text-shadow: 0 0 15px currentColor; }
.text-closed { color: #dc3569; text-shadow: 0 0 15px currentColor; }

/* Reloj Digital Pila */
.hangar-timer-display {
    font-size: 5rem;
    font-family: 'Orbitron', monospace; /* fuente de sci-fi */
    font-variant-numeric: tabular-nums; /* Evita que el reloj baile o tiemble al cambiar de un 1 a un 0 */
    font-weight: bold;
    letter-spacing: 0; /* Controlamos el spacing al separar los caracteres localmente con JS en EM */
    margin: 10px 0 25px 0;
    line-height: 1;
}

.timer-digit {
    display: inline-block;
    width: 0.7em;
    margin: 0 3px;
    text-align: center;
}

.timer-colon {
    display: inline-block;
    width: 0.4em;
    margin: 0 3px;
    text-align: center;
    transform: translateY(-0.08em);
}

.hangar-timer-subtitle {
    font-size: 1rem;
    color: #a8bccd;
}

/* Colores Dinámicos del Reloj Numérico (Invertidos) */
.clock-open {
    color: #28a745;
    text-shadow: 0 0 25px rgba(40, 167, 69, 0.5);
}

.clock-closed {
    color: #dc3569;
    text-shadow: 0 0 25px rgba(220, 53, 105, 0.5);
}

/* Texto de Siguiente Apertura y Alarma (Caja Unificada) */
.unified-control-box {
    margin-top: 25px;
    display: inline-flex;
    align-items: center;
    background: rgba(15, 22, 36, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px 10px 20px;
    gap: 15px;
}

.next-open-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.next-open-title {
    font-size: 1.1rem;
    color: #a8bccd;
    font-weight: bold;
    letter-spacing: 1px;
}

.next-open-value {
    color: #ffffff;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-weight: bold;
}

/* Botón de Alarma (Interno a la caja) */
.hangar-alarm-btn {
    background: rgba(220, 53, 105, 0.15); /* Fondo rojizo suave por defecto (apagado) */
    border: 1px solid #dc3569; /* Borde rojo */
    color: #dc3569; /* Icono rojo */
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hangar-alarm-btn:hover {
    background: rgba(220, 53, 105, 0.3);
}

.hangar-alarm-btn.alarm-on {
    background: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}

.hangar-alarm-btn.alarm-on:hover {
    background: rgba(40, 167, 69, 0.4);
}

/* Indicadores LED Rectangulares */
.hangar-led-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 35px;
}

.hangar-led {
    width: 45px;
    height: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05); /* Vacío / Apagado */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

/* Estados LED Encendido */
.hangar-led.led-green {
    background: #28a745;
    border-color: #2fed52;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
}

.hangar-led.led-red {
    background: #dc3569;
    border-color: #ff4a82;
    box-shadow: 0 0 15px rgba(220, 53, 105, 0.6);
}

/* =======================================
   HISTORIAL DE APERTURAS
   Similar a estado.html pero adaptado 
   ======================================= */
.hangar-history-container {
    margin-top: 50px;
}

.hangar-log-item {
    background: rgba(15, 22, 36, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px 20px 15px 30px; /* Mas padding a la izquierda para la barra */
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.hangar-log-item:hover {
    background: rgba(15, 22, 36, 0.55);
}

/* Barra gruesa izquierda del log */
.hangar-log-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px; /* Barra gruesa */
    transition: background 0.3s ease;
}

/* Variaciones de la barra según si el evento es Apertura o Cierre */
.hangar-log-item.log-open::before {
    background: #28a745;
    box-shadow: 2px 0 10px rgba(40, 167, 69, 0.5);
}

.hangar-log-item.log-close::before {
    background: #dc3569;
    box-shadow: 2px 0 10px rgba(220, 53, 105, 0.5);
}

.hangar-log-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hangar-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hangar-log-title {
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.hangar-log-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Tag de estado lado derecho */
.hangar-log-tag {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hangar-log-tag.tag-open {
    background: rgba(40, 167, 69, 0.15);
    border-color: #28a745;
    color: #28a745;
}

.hangar-log-tag.tag-close {
    background: rgba(220, 53, 105, 0.15);
    border-color: #dc3569;
    color: #dc3569;
}
