/**
 * Officer Directos v1.3.3
 *
 * Cuatro bloques:
 *   1. Listado (portada/categoría): pastilla pequeña pegada a la categoría.
 *   2. Single — Kicker HTML "EN DIRECTO" inyectado arriba del título.
 *   3. Single — Bloque de notas dentro del cuerpo (sin fondo, alineado a la izq).
 *   4. Headbar global (opcional).
 */

/* =============================================================
   1. LISTADO — Pastilla "EN DIRECTO" pegada a la categoría
   ============================================================= */

article.type-officer_directo .cs-meta-category,
article.type-officer_directo .cs-entry__category,
article.type-officer_directo [class*="cs-meta-category"],
article.type-officer_directo [class*="cs-entry__category"] {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

article.type-officer_directo .cs-meta-category::after,
article.type-officer_directo .cs-entry__category::after,
article.type-officer_directo [class*="cs-meta-category"]::after,
article.type-officer_directo [class*="cs-entry__category"]::after {
    content: "● EN DIRECTO";
    display: inline-block;
    background: #d72638;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.4;
    vertical-align: middle;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    animation: od-pulse 1.6s ease-in-out infinite;
}

@keyframes od-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* =============================================================
   2. SINGLE — Kicker HTML "EN DIRECTO" arriba del título
   ============================================================= */

/* El kicker es un div inyectado por PHP via csco_entry_container_start,
   prioridad 5 (antes que el header del tema en prioridad 10).
   Aparece justo dentro del contenedor de la entrada, antes del título. */

body.single-officer_directo .od-kicker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 18px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

body.single-officer_directo .od-kicker > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d72638;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 2px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

body.single-officer_directo .od-kicker--closed > span {
    background: #6b6b6b;
}

body.single-officer_directo .od-kicker--live > span {
    animation: od-pulse 1.6s ease-in-out infinite;
}

body.single-officer_directo .od-kicker__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    display: inline-block;
}

/* =============================================================
   3. SINGLE — Bloque de notas dentro del cuerpo
   ============================================================= */

.od-inline {
    margin: 24px 0;
    padding: 0;
}

/* Barra interna: SIN fondo, SIN borde. Solo "última actualización" + refresh. */
.od-inline__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0;
    background: none;
    border: none;
    margin-bottom: 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
}

/* En el single, ocultamos el badge interno (el rojo ya está arriba como kicker) */
body.single-officer_directo .od-inline__badge {
    display: none;
}

/* En contextos donde sí se muestra (shortcode embebido en otro post): */
.od-inline__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-radius: 3px;
    text-transform: uppercase;
    line-height: 1;
}

.od-inline__badge--live {
    background: #d72638;
    color: #fff;
}

.od-inline__badge--closed {
    background: #6b6b6b;
    color: #fff;
}

.od-inline__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    display: inline-block;
    animation: od-pulse 1.6s ease-in-out infinite;
}

.od-inline__updated {
    color: #687380;
    font-size: 12px;
    margin-right: auto;
}

.od-inline__updated-time {
    color: #45505b;
    font-weight: 500;
}

.od-inline__refresh {
    background: transparent;
    border: 1px solid #d8d8d8;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #687380;
    transition: color 0.15s ease, border-color 0.15s ease;
    padding: 0;
}

.od-inline__refresh:hover {
    color: #45505b;
    border-color: #45505b;
}

.od-inline__refresh.is-loading svg {
    animation: od-spin 0.8s linear infinite;
}

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

.od-inline__empty {
    padding: 24px 0;
    color: #687380;
    font-style: italic;
    margin: 0;
}

/* Items individuales (cada nota) */
.od-inline__list .od-item {
    border-left: 3px solid #d72638;
    padding: 0 0 0 18px;
    margin: 0 0 28px;
    position: relative;
}

.od-inline__list .od-item:last-child {
    margin-bottom: 0;
}

.od-item__time {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 12px;
    color: #687380;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
    font-weight: 600;
}

.od-item__breaking {
    display: inline-block;
    background: #d72638;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 2px 7px;
    border-radius: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.od-item__title {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 10px;
    color: #45505b;
    font-weight: 700;
}

.od-item__title a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.od-item__title a:hover {
    border-bottom-color: #45505b;
}

.od-item__image {
    margin: 12px 0;
}

.od-item__image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.od-item__comment {
    color: #2a2a2a;
    line-height: 1.6;
    margin: 0 0 12px;
    font-size: 16px;
}

.od-item__view-news {
    display: inline-block;
    color: #687380;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #d0d4d9;
    padding-bottom: 1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.od-item__view-news:hover {
    color: #d72638;
    border-bottom-color: #d72638;
}

.od-inline__list .od-item iframe,
.od-inline__list .od-item .twitter-tweet,
.od-inline__list .od-item blockquote {
    max-width: 100%;
    margin: 12px 0;
}

.od-item--breaking {
    border-left-color: #d72638;
    background: linear-gradient(to right, rgba(215, 38, 56, 0.04), transparent 60%);
}

/* =============================================================
   4. Headbar global "EN DIRECTO" (opcional)
   ============================================================= */

.od-headbar {
    background: #d72638;
    color: #fff;
    padding: 10px 18px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    position: relative;
    z-index: 999;
}

.od-headbar a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.od-headbar a:hover {
    border-bottom-color: #fff;
}

.od-headbar__label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-right: 8px;
}

.od-headbar__label::before {
    content: "● ";
    animation: od-pulse 1.6s ease-in-out infinite;
}

/* =============================================================
   5. Responsive
   ============================================================= */

@media (max-width: 600px) {
    .od-inline__bar {
        gap: 8px;
    }
    .od-inline__updated {
        flex-basis: 100%;
        order: 3;
    }
    .od-item__title {
        font-size: 18px;
    }
    .od-kicker > span {
        font-size: 10px;
        padding: 4px 8px;
    }
}
