/* Bullish Financial Reports – Frontend shortcode CSS */

.bfr-widget {
    margin: 1.5em 0;
    font-family: 'Libre Baskerville', serif;
}

.bfr-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 1em;
}

.bfr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.bfr-table thead { display: none; }

.bfr-table, .bfr-table tbody, .bfr-table tr, .bfr-table td {
    display: block;
    width: 100%;
}

.bfr-table tr {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.6em;
    padding: 14px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.bfr-table td {
    padding: 0;
    border: none;
    color: #111827;
}

.bfr-row--soon { background: #f0f9ff; }

.bfr-table .bfr-date {
    flex: 0 0 5em;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

.bfr-table .bfr-company {
    flex: 1 1 auto;
    min-width: 0;
}

.bfr-table .bfr-company strong a {
    color: inherit;
    text-decoration: none;
}

.bfr-table .bfr-company strong a:hover {
    text-decoration: underline;
}

.bfr-table .bfr-type {
    flex: 0 0 4.5em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: right;
}

.bfr-table .bfr-market {
    flex: 0 0 6em;
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    text-align: right;
}

@media (max-width: 600px) {
    .bfr-table .bfr-market { display: none; }
}

.bfr-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

.bfr-tag--today { background: #d1fae5; color: #047857; }
.bfr-tag--soon  { background: #e0f2fe; color: #0369a1; }

.bfr-flag {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: middle;
    border-radius: 2px;
    overflow: hidden;
    line-height: 0;
}

.bfr-flag + .bfr-flag { margin-left: -2px; }

.bfr-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.bfr-ticker {
    font-family: 'JetBrains Mono', monospace;
    color: #9ca3af;
    font-size: 0.75em;
    margin-left: 4px;
}

.bfr-empty { color: #9ca3af; font-style: italic; }

/* ============================================================
   INDICES TABLE
   ============================================================ */

.bfr-table--indices thead { display: none; }

.bfr-table--indices, .bfr-table--indices tbody, .bfr-table--indices tr, .bfr-table--indices td {
    display: block;
    width: 100%;
}

.bfr-table--indices tr {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 16px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.bfr-table--indices tr:last-child {
    border-bottom: none;
}

.bfr-table--indices td {
    padding: 0;
    border: none;
    color: #111827;
}

.bfr-table--indices .bfr-company {
    flex: 1 1 auto;
    min-width: 0;
}

.bfr-table--indices .bfr-company strong {
    font-size: 0.9rem;
}

.bfr-index-value {
    flex: 0 0 6.5em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.bfr-index-change {
    flex: 0 0 5.5em;
    text-align: right;
}

.bfr-index-change span {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.bfr-table--indices td.bfr-index-change--up span {
    color: #047857;
    background: #ecfdf5;
}

.bfr-table--indices td.bfr-index-change--down span {
    color: #dc2626;
    background: #fef2f2;
}

.bfr-index-date {
    margin-top: 1em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    text-align: right;
}

/* ── [bfr_indices_strip] ──────────────────────────────────────────────────── */

.bfr-indices-strip {
    display: block;
    margin: 0 0 2em;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    color: inherit;
    text-decoration: none;
}

.bfr-indices-strip-inner {
    padding: 0.5em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

@media (min-width: 1024px) {
    .bfr-indices-strip-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.bfr-indices-strip-inner::-webkit-scrollbar {
    display: none;
}

.bfr-indices-strip .bfr-teaser-indices {
    flex-wrap: nowrap;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    width: 100%;
    min-width: max-content;
    justify-content: space-between;
}

@media (max-width: 600px) {
    .bfr-indices-strip-inner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        overflow-x: visible;
    }
    .bfr-indices-strip .bfr-teaser-indices {
        min-width: 0;
    }
    .bfr-indices-strip .bfr-teaser-index-symbol,
    .bfr-indices-strip .bfr-teaser-index-value {
        display: none;
    }
    .bfr-indices-strip .bfr-teaser-index {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.3em;
    }
}

/* ── [bfr_teaser] ─────────────────────────────────────────────────────────── */

.bfr-teaser-indices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1.25em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding-bottom: 0.75em;
    margin-bottom: 0.75em;
    border-bottom: 1px solid #e5e7eb;
}

.bfr-teaser-index {
    white-space: nowrap;
    color: #111827;
}

.bfr-teaser-index strong {
    margin-right: 0.4em;
}

.bfr-teaser-index-country {
    display: none;
}

.bfr-teaser-index .bfr-index-change--up   { color: #047857; }
.bfr-teaser-index .bfr-index-change--down { color: #dc2626; }

.bfr-teaser {
    margin-bottom: 2rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.dark .bfr-teaser {
    border-color: #374151;
}

.bfr-teaser-reports {
    font-size: 0.85rem;
    color: #111827;
}

.bfr-teaser-day {
    margin-bottom: 0.6em;
}

.bfr-teaser-day-label {
    display: inline;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-right: 0.5em;
}

.bfr-teaser-list {
    display: inline;
}

.bfr-teaser-report-row {
    display: inline;
}

.bfr-teaser-report-row + .bfr-teaser-report-row::before {
    content: ', ';
    color: #9ca3af;
}

.bfr-teaser-report-name {
    display: inline;
    font-size: 0.85rem;
    color: #111827;
}

.bfr-teaser-report-name a {
    color: inherit;
    text-decoration: none;
}

.bfr-teaser-report-name a:hover {
    text-decoration: underline;
}

.bfr-tag--type {
    background: #f3f4f6;
    color: #6b7280;
    vertical-align: middle;
    margin-left: 3px;
}

.bfr-teaser-empty {
    font-size: 0.85rem;
    color: #9ca3af;
}

.bfr-teaser-btn {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.375rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    color: #6b7280;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.bfr-teaser-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.dark .bfr-teaser-btn {
    border-color: #374151;
    color: #9ca3af;
}

.dark .bfr-teaser-btn:hover {
    background: #1f2937;
    color: #fff;
}

@media (max-width: 600px) {
    .bfr-table--indices tr {
        gap: 0.6em;
        padding: 14px 8px;
    }
    .bfr-table--indices .bfr-company {
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    .bfr-table--indices .bfr-company .bfr-flag {
        flex: 0 0 auto;
    }
    .bfr-table--indices .bfr-company strong {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.85rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .bfr-table--indices .bfr-ticker {
        display: none;
    }
    .bfr-index-value {
        flex: 0 0 5em;
        font-size: 0.9rem;
    }
    .bfr-index-change {
        flex: 0 0 4.2em;
    }
    .bfr-index-change span {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.bfr-widget .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.bfr-widget .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.25rem;
    color: #4b5563;
    text-decoration: none;
}

.bfr-widget .pagination a.page-numbers:hover {
    background: #f3f4f6;
}

.bfr-widget .pagination .page-numbers.current {
    background: #4b5563;
    color: #fff;
}

/* Dark mode */
.dark .bfr-table tr { border-color: #374151; }
.dark .bfr-table td { color: #f3f4f6; }
.dark .bfr-table .bfr-date,
.dark .bfr-table .bfr-market { color: #6b7280; }
.dark .bfr-table .bfr-type { color: #9ca3af; }
.dark .bfr-row--soon { background: #0c2d3f; }
.dark .bfr-tag--today { background: #064e3b; color: #6ee7b7; }
.dark .bfr-tag--soon  { background: #0c4a6e; color: #7dd3fc; }
.dark .bfr-ticker { color: #6b7280; }
.dark .bfr-empty { color: #6b7280; }

.dark .bfr-table--indices tr { border-color: #374151; }
.dark .bfr-table--indices td { color: #f3f4f6; }
.dark .bfr-table--indices td.bfr-index-change--up span {
    color: #6ee7b7;
    background: #064e3b;
}
.dark .bfr-table--indices td.bfr-index-change--down span {
    color: #fca5a5;
    background: #450a0a;
}
.dark .bfr-index-date { color: #6b7280; }

.dark .bfr-indices-strip { background: #111827; border-color: #374151; }
.dark .bfr-teaser-indices { border-color: #374151; }
.dark .bfr-teaser-index { color: #f3f4f6; }
.dark .bfr-teaser-index .bfr-index-change--up   { color: #6ee7b7; }
.dark .bfr-teaser-index .bfr-index-change--down { color: #fca5a5; }
.dark .bfr-teaser-reports { color: #f3f4f6; }
.dark .bfr-teaser-day-label { color: #9ca3af; }
.dark .bfr-teaser-empty { color: #6b7280; }
.dark .bfr-teaser-more { color: #6b7280; }

.dark .bfr-widget .pagination .page-numbers { color: #9ca3af; }
.dark .bfr-widget .pagination a.page-numbers:hover { background: #1f2937; }
.dark .bfr-widget .pagination .page-numbers.current { background: #374151; color: #fff; }
