/* ========================================
   GENEX DOWNLOADS MANAGER v2.0
   ======================================== */

.gdm-downloads-wrapper {
    margin: 40px 0;
    padding: 20px 0;
}

/* Sección de producto */
.gdm-producto-seccion {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.gdm-producto-seccion:last-child {
    border-bottom: none;
}

.gdm-producto-header {
    margin-bottom: 25px;
}

.gdm-producto-nombre {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
}

/* ========================================
   HEADERS DE TURNO
   ======================================== */

.gdm-turno-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 20px;
    margin-top: 25px;
}

.gdm-turno-header:first-of-type {
    margin-top: 0;
}

.gdm-turno-header.manana {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}

.gdm-turno-header.tarde {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}

/* ========================================
   GRID DE FLASHES
   ======================================== */

.gdm-flashes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

/* Tarjeta de flash */
.gdm-flash-card {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: transform 0.2s ease;
}

.gdm-flash-card:hover:not(.gdm-bloqueado):not(.gdm-inactivo) {
    transform: translateY(-3px);
}

.gdm-flash-card.gdm-bloqueado {
    opacity: 0.5;
}

/* Estado inactivo por horario */
.gdm-flash-card.gdm-inactivo .gdm-flash-icono {
    background: #f0f0f0;
}

.gdm-flash-card.gdm-inactivo .gdm-flash-etiqueta {
    color: #bbb;
}

.gdm-flash-card.gdm-inactivo .gdm-flash-numero {
    color: #ccc;
}

/* Card bloqueada por horario: candado simple, sin countdown */
.gdm-flash-locked {
    padding: 12px 8px;
    background: #f5f5f5;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-top: 1px solid #e8e8e8;
}

.gdm-flash-locked svg {
    width: 14px;
    height: 14px;
}

/* Aviso de sección inactiva (con countdown único por sección) */
.gdm-turno-inactivo-aviso {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: #fffbf0;
    border: 1px solid #ffe6b3;
    border-left: 3px solid #ffa900;
    border-radius: 5px;
    font-size: 13px;
    color: #8a7350;
    margin-bottom: 14px;
}

.gdm-turno-inactivo-aviso svg {
    flex-shrink: 0;
    color: #ffa900;
}

.gdm-countdown-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #b08a3c;
}

.gdm-countdown-inline .gdm-countdown-timer {
    font-size: 14px;
    font-weight: 800;
    color: #333;
    letter-spacing: 0;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .gdm-turno-inactivo-aviso {
        flex-wrap: wrap;
    }
    .gdm-countdown-inline {
        width: 100%;
        margin-top: 4px;
    }
}

.gdm-flash-contenido {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Área superior con número */
.gdm-flash-icono {
    background: #f9f9f9;
    padding: 20px 12px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
}

.gdm-flash-etiqueta {
    font-size: 10px;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.gdm-flash-numero {
    font-size: 38px;
    font-weight: 800;
    color: #555;
    line-height: 1;
    margin-top: 4px;
}

/* Botón descargar */
.gdm-flash-boton {
    padding: 12px 8px;
    background: #ffa900;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
}

.gdm-flash-boton:hover {
    background: #e69800;
    color: #fff;
}

.gdm-flash-boton svg {
    flex-shrink: 0;
}

/* Estado bloqueado */
.gdm-flash-bloqueado {
    padding: 12px 8px;
    background: #f0f0f0;
    color: #999;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    letter-spacing: 0.3px;
}

/* ========================================
   PRODUCTOS GENÉRICOS - TABLA
   ======================================== */

.gdm-producto-tabla {
    margin: 20px 0;
}

.gdm-downloads-list {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.gdm-downloads-list thead {
    background: #f5f5f5;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.gdm-downloads-list th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gdm-downloads-list tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.gdm-downloads-list tbody tr:last-child {
    border-bottom: none;
}

.gdm-downloads-list tbody tr:hover {
    background: #fafafa;
}

.gdm-downloads-list td {
    padding: 12px 16px;
}

.gdm-col-accion {
    text-align: right;
    width: 160px;
}

.gdm-archivo-nombre {
    font-size: 13px;
    color: #444;
}

.gdm-boton-descargar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #ffa900;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.gdm-boton-descargar:hover {
    background: #e69800;
    color: #fff;
}

.gdm-boton-descargar svg {
    flex-shrink: 0;
}

/* ========================================
   NOTA INFORMATIVA
   ======================================== */

.gdm-nota {
    background: #fffbf0;
    border-left: 3px solid #ffa900;
    padding: 12px 16px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.gdm-nota strong {
    color: #333;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .gdm-downloads-wrapper {
        margin: 20px 0;
        padding: 10px 0;
    }

    .gdm-producto-seccion {
        margin-bottom: 30px;
        padding-bottom: 25px;
    }

    .gdm-producto-nombre {
        font-size: 18px;
    }

    .gdm-flashes-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .gdm-flash-numero {
        font-size: 32px;
    }

    .gdm-col-accion {
        width: auto;
    }
}

@media (max-width: 480px) {
    .gdm-downloads-list th,
    .gdm-downloads-list td {
        padding: 10px 12px;
    }

    .gdm-boton-descargar {
        padding: 8px 12px;
        font-size: 12px;
    }
}
