/**
 * BBG Press Releases Page — front-end styles.
 *
 * Usage: [bbg_press_releases]
 *
 * @package BBG_Custom_Plugin
 */

/* ── Wrap ──────────────────────────────────────────────────────── */
.bbg-pr-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: inherit;
}

/* ── Filter bar ────────────────────────────────────────────────── */
.bbg-pr-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.40);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 24, 69, 0.08);
}

.bbg-pr-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bbg-pr-filter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #6b7280;
    min-width: 60px;
    flex-shrink: 0;
}

.bbg-pr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bbg-pr-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 50px;
    border: 1.5px solid rgba(0, 45, 114, 0.14);
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #374A6D;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.4;
    font-family: inherit;
}

.bbg-pr-pill:hover {
    border-color: #001845;
    background: linear-gradient(135deg, #001845 0%, #0050C8 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,24,69,0.28);
}

.bbg-pr-pill.active {
    background: linear-gradient(135deg, #001845 0%, #0050C8 100%);
    border-color: #001845;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,24,69,0.28);
}
}

.bbg-pr-pill-year {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 400;
}

/* ── Meta bar ──────────────────────────────────────────────────── */
.bbg-pr-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.bbg-pr-count {
    font-size: 14px;
    color: #7A8AAD;
}

.bbg-pr-count strong {
    color: #0D1B3E;
    font-weight: 700;
}

/* ── Grid ──────────────────────────────────────────────────────── */
.bbg-pr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* ── Card ──────────────────────────────────────────────────────── */
.bbg-pr-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px) saturate(1.5);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.40);
    overflow: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 24, 69, 0.08), 0 1px 4px rgba(0, 24, 69, 0.04);
}

.bbg-pr-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 56px rgba(0, 24, 69, 0.16), 0 0 0 1.5px rgba(0, 45, 114, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
}

.bbg-pr-card.bbg-pr-hidden {
    display: none;
}

/* ── Card header ───────────────────────────────────────────────── */
.bbg-pr-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px 12px;
    background: linear-gradient(135deg, #001845 0%, #002D72 50%, #0050C8 100%);
    position: relative;
}

.bbg-pr-edition-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.2);
}

.bbg-pr-edition-thumb--placeholder {
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 18px;
}

.bbg-pr-edition-info {
    flex: 1;
    min-width: 0;
}

.bbg-pr-edition-city {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbg-pr-edition-year {
    display: inline-block;
    font-size: 11px;
    color: rgba(255,255,255,.6);
    margin-top: 2px;
}

.bbg-pr-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    flex-shrink: 0;
}

.bbg-pr-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.bbg-pr-badge-lang {
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.2);
}

.bbg-pr-badge-ext {
    background: #EBF5FB;
    color: #1A5276;
}

.bbg-pr-badge-ext[data-ext="PDF"],
.bbg-pr-card[data-ext="pdf"] .bbg-pr-badge-ext {
    background: #FDEDEC;
    color: #922B21;
}

/* ── Card body ─────────────────────────────────────────────────── */
.bbg-pr-card-body {
    padding: 20px 18px 12px;
    flex: 1;
}

.bbg-pr-file-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.bbg-pr-icon-pdf { color: #e74c3c; }
.bbg-pr-icon-doc { color: #2980b9; }

.bbg-pr-title {
    font-size: 16px;
    font-weight: 700;
    color: #0A1628;
    line-height: 1.38;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.bbg-pr-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    font-style: normal;
}

.bbg-pr-date i {
    color: #9ca3af;
    font-size: 11px;
}

.bbg-pr-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card footer ─── see below "Actions row" section ──────────── */

.bbg-pr-filesize {
    font-size: 12px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bbg-pr-filesize i {
    font-size: 11px;
}

.bbg-pr-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #001845 0%, #0050C8 100%);
    color: #fff !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.18s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,24,69,0.30), 0 2px 6px rgba(0,24,69,0.15);
}

.bbg-pr-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0,24,69,0.40);
    color: #fff !important;
}

.bbg-pr-download-btn i {
    font-size: 12px;
}

/* ── Empty state ───────────────────────────────────────────────── */
.bbg-pr-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

.bbg-pr-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bbg-pr-empty-state p {
    font-size: 16px;
    margin: 0;
}

.bbg-pr-empty {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-size: 16px;
}

/* ── Load more ─────────────────────────────────────────────────── */
.bbg-pr-load-more-wrap {
    text-align: center;
    padding: 0 0 32px;
}

.bbg-pr-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: transparent;
    border: 2px solid #001845;
    color: #001845;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.bbg-pr-load-more:hover {
    background: linear-gradient(135deg, #001845 0%, #0050C8 100%);
    border-color: #001845;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0,24,69,0.28);
}

#bbg-pr-remaining {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #001845;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.bbg-pr-load-more:hover #bbg-pr-remaining {
    background: rgba(255,255,255,.25);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bbg-pr-filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .bbg-pr-filter-label {
        min-width: unset;
    }

    .bbg-pr-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .bbg-pr-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .bbg-pr-filters {
        padding: 16px 16px;
    }
}

@media (max-width: 480px) {
    .bbg-pr-wrap {
        padding: 0 12px;
    }

    .bbg-pr-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .bbg-pr-actions {
        width: 100%;
    }

    .bbg-pr-download-btn,
    .bbg-pr-preview-btn {
        flex: 1;
        justify-content: center;
    }

    .bbg-pr-title {
        font-size: 15px;
    }

    .bbg-pr-pills {
        gap: 4px;
    }

    .bbg-pr-pill {
        font-size: 12px;
        padding: 4px 12px;
    }
}

/* ── Language version tabs ─────────────────────────────────────── */
.bbg-pr-lang-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 18px 0;
    flex-wrap: wrap;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
}

.bbg-pr-lang-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    margin-bottom: -1px;
    border-radius: 0;
}

.bbg-pr-lang-tab:hover {
    color: #0D1B3E;
    border-bottom-color: rgba(0, 45, 114, 0.25);
}

.bbg-pr-lang-tab.active {
    color: #002D72;
    border-bottom-color: #002D72;
}

.bbg-pr-lang-tab .bbg-pr-lang-name {
    font-size: 12px;
}

/* Single language indicator (no tabs needed) */
.bbg-pr-lang-single {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}

/* Language code badge (replaces flag emoji) */
.bbg-pr-lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    background: #6b7280;
    flex-shrink: 0;
}
.bbg-pr-lang-GR { background: #0d5eaf; }
.bbg-pr-lang-EN { background: #012169; }
.bbg-pr-lang-FR { background: #002395; }
.bbg-pr-lang-DE { background: #1a1a1a; }
.bbg-pr-lang-TR { background: #e30a17; }
.bbg-pr-lang-RO { background: #002b7f; }

.bbg-pr-lang-name {
    font-size: 12px;
    color: inherit;
}

/* ── Actions row (preview + download) ─────────────────────────── */
.bbg-pr-card-footer {
    padding: 12px 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f3f4f6;
    gap: 12px;
}

.bbg-pr-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.bbg-pr-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1.5px solid #001845;
    color: #001845;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.bbg-pr-preview-btn:hover {
    background: #001845;
    color: #fff;
}

.bbg-pr-preview-btn i {
    font-size: 12px;
}

/* ── Preview Modal ─────────────────────────────────────────────── */
#bbg-pr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#bbg-pr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#bbg-pr-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    height: 85vh;
    background: #1A1A2E;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

#bbg-pr-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #16213E;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

#bbg-pr-modal-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 80px);
}

.bbg-pr-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#bbg-pr-modal-open,
#bbg-pr-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 13px;
    font-family: inherit;
    text-decoration: none;
}

#bbg-pr-modal-open:hover,
#bbg-pr-modal-close:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
}

#bbg-pr-modal-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

@media (max-width: 600px) {
    #bbg-pr-modal {
        padding: 8px;
    }
    #bbg-pr-modal-box {
        height: 92vh;
        border-radius: 8px;
    }
}
