/**
 * [wss_notes_premsa] — estilos independientes del shortcode de notas de prensa.
 * Variable inyectada inline desde PHP:
 *   --wss-np-accent : color destacado (#AB192D por defecto)
 */

.wss-np {
    --wss-np-accent: #AB192D;
    --wss-np-radius: 10px;
    color: #222;
    box-sizing: border-box;
}

.wss-np *,
.wss-np *::before,
.wss-np *::after {
    box-sizing: border-box;
}

/* ---------- Buscador ---------- */
.wss-np-search {
    margin-bottom: 22px;
}

.wss-np-search__field {
    position: relative;
    display: flex;
    align-items: center;
}

.wss-np-search__icon {
    position: absolute;
    right: 18px;
    width: 16px;
    height: 16px;
    border: 2px solid #999;
    border-radius: 50%;
    pointer-events: none;
}

.wss-np-search__icon::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 11px;
    width: 7px;
    height: 2px;
    background: #999;
    transform: rotate(45deg);
    transform-origin: left center;
}

.wss-np-search__input {
    width: 100%;
    padding: 12px 44px 12px 18px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.3;
    color: #222;
    background: #fff;
    border: 1.5px solid #d9d9d9;
    border-radius: 999px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.wss-np-search__input::placeholder {
    color: #999;
}

.wss-np-search__input:focus,
.wss-np-search__input:focus-visible {
    border-color: var(--wss-np-accent);
    box-shadow: 0 0 0 3px rgba(171, 25, 45, .12);
    outline: none;
}

/* ---------- Listado en filas ---------- */
.wss-np-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wss-np-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: var(--wss-np-radius);
    transition: box-shadow .18s ease, border-color .18s ease;
}

.wss-np-row[hidden] {
    display: none;
}

.wss-np-row:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    border-color: rgba(171, 25, 45, .35);
}

.wss-np-row__body {
    flex: 1 1 auto;
    min-width: 0;
}

.wss-np-row__title {
    font-size: 1.02rem;
    line-height: 1.35;
    font-weight: 600;
    margin: 0;
    color: #1d1d1d;
    overflow-wrap: break-word;
}

.wss-np-row__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: .86rem;
    color: #666;
    white-space: nowrap;
}

.wss-np-row__date-icon {
    width: 13px;
    height: 13px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    position: relative;
    flex: 0 0 auto;
}

.wss-np-row__date-icon::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 2px;
    right: 2px;
    height: 3px;
    border-left: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
}

.wss-np-row__action {
    flex: 0 0 auto;
}

/* ---------- Botón de descarga ---------- */
.wss-np-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--wss-np-accent);
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .18s ease;
}

.wss-np-download:hover,
.wss-np-download:focus,
.wss-np-download:focus-visible {
    background: var(--wss-np-accent);
    color: #fff;
    text-decoration: none;
    filter: brightness(1.1);
    outline: none;
}

.wss-np-download__icon {
    width: 14px;
    height: 14px;
    position: relative;
    flex: 0 0 auto;
}

.wss-np-download__icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 9px;
    background: currentColor;
    transform: translateX(-50%);
}

.wss-np-download__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateX(-50%) rotate(45deg);
}

.wss-np-download--disabled {
    background: #e3e3e3;
    color: #999;
    cursor: not-allowed;
}

/* ---------- Sin resultados / vacío ---------- */
.wss-np-noresults,
.wss-np-empty {
    margin: 12px 0 0;
    padding: 20px;
    text-align: center;
    color: #666;
    background: #f7f7f7;
    border-radius: 8px;
}

.wss-np-noresults[hidden] {
    display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .wss-np-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .wss-np-row__action {
        flex-basis: 100%;
        margin-top: 4px;
    }

    .wss-np-download {
        width: 100%;
        justify-content: center;
    }
}
