/* Scoped fix: prevent theme styles from breaking Bootstrap components
   inside the AI content container. Only targets known interference
   points — leaves theme typography/colors alone. */

.esy-ai-content-page *,
.esy-ai-content-page *::before,
.esy-ai-content-page *::after {
    box-sizing: border-box;
}

.esy-ai-content-page .container {
    max-width: 960px;
}

.esy-ai-content-page img {
    max-width: 100%;
    height: auto;
}

.esy-ai-content-page section {
    margin-bottom: 2rem;
}

/* Accordion — themes often override colors/backgrounds making text invisible */
.esy-ai-content-page .accordion-button {
    background-color: #fff;
    color: #212529;
    border: none;
    box-shadow: none;
    outline: none;
    font-size: inherit;
    cursor: pointer;
}

.esy-ai-content-page .accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0c63e4;
}

.esy-ai-content-page .accordion-button::after {
    filter: none;
}

.esy-ai-content-page .accordion-item {
    background-color: #fff;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.esy-ai-content-page .accordion-body {
    background-color: #fff;
    color: #212529;
}

.esy-ai-content-page .accordion-header {
    color: #212529;
}

/* Tables — themes often strip borders or add custom backgrounds */
.esy-ai-content-page .table {
    border-collapse: collapse;
    width: 100%;
}

.esy-ai-content-page .table th,
.esy-ai-content-page .table td {
    padding: 0.75rem;
    vertical-align: top;
    border: 1px solid #dee2e6;
    background-color: transparent;
}

.esy-ai-content-page .table thead th {
    background-color: #f8f9fa;
}

.esy-ai-content-page .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Cards — themes override border-radius and backgrounds */
.esy-ai-content-page .card {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
}

.esy-ai-content-page .card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* List groups — theme list resets break these */
.esy-ai-content-page .list-group-item {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
}

.esy-ai-content-page .list-group-item::before {
    content: none;
}

/* Badges and alerts */
.esy-ai-content-page .badge {
    display: inline-block;
    font-size: 0.75em;
}

.esy-ai-content-page .alert {
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

/* Tabs/nav — themes restyle these heavily */
.esy-ai-content-page .nav-tabs .nav-link {
    background-color: transparent;
    border: 1px solid transparent;
}

.esy-ai-content-page .nav-tabs .nav-link.active {
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Lists inside content — prevent theme custom bullets */
.esy-ai-content-page li::before {
    content: none;
}

/* Links — default to Bootstrap blue */
.esy-ai-content-page a:not(.btn):not(.nav-link):not(.accordion-button) {
    color: #0d6efd;
}

.esy-ai-content-page a:not(.btn):not(.nav-link):not(.accordion-button):hover {
    color: #0a58ca;
}

/* Buttons — theme button resets break Bootstrap buttons */
.esy-ai-content-page .btn {
    display: inline-block;
    border-radius: 0.375rem;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Spotlight / "Did You Know" callouts
   ═══════════════════════════════════════════════════════════════════════════ */

.esy-spotlight {
    --spotlight-yellow: #f5b82e;
    --spotlight-yellow-tint: #fff8e1;
    --spotlight-yellow-tint-soft: #fffbea;
    --spotlight-ink: #1a1a1a;
    --spotlight-label: #8a6a00;
    --spotlight-body-size: 1.0625rem;
    --spotlight-body-line: 1.55;
}

.esy-spotlight__body {
    font-size: var(--spotlight-body-size);
    line-height: var(--spotlight-body-line);
    color: #212529;
}

/* Variant B: Left Accent + Badge */
.esy-spotlight--left-accent {
    background: var(--spotlight-yellow-tint);
    border-left: 8px solid var(--spotlight-yellow);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem;
}

.esy-spotlight--left-accent .esy-spotlight__badge {
    display: inline-flex;
    align-items: center;
    background: var(--spotlight-yellow);
    color: var(--spotlight-ink);
    padding: .4em .7em;
    border-radius: .375rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .06em;
    font-size: .8rem;
    margin-bottom: .75rem;
}

.esy-spotlight--left-accent .esy-spotlight__badge .bi {
    margin-right: .35em;
}

/* Variant C: Floating Icon Chip */
.esy-spotlight--floating-chip {
    position: relative;
    background: var(--spotlight-yellow-tint-soft);
    border: 2px solid var(--spotlight-yellow);
    border-radius: 10px;
    padding: 2.25rem 1.5rem 1.5rem;
    margin-top: 26px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.esy-spotlight__chip {
    position: absolute;
    top: -24px;
    left: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--spotlight-yellow);
    border: 3px solid #fff;
    color: var(--spotlight-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.esy-spotlight__eyebrow {
    font-size: .8rem;
    letter-spacing: .1em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--spotlight-label);
    margin-bottom: .35rem;
}

/* Variant F: Editorial Quote */
.esy-spotlight--editorial {
    display: flex;
    background: var(--spotlight-yellow-tint);
    border: 2px solid var(--spotlight-yellow);
    border-radius: 8px;
    padding: 1.5rem;
}

.esy-spotlight__mark {
    flex: 0 0 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 1.25rem;
}

.esy-spotlight__mark > .bi {
    font-size: 3rem;
    color: var(--spotlight-yellow);
    line-height: 1;
}

.esy-spotlight__mark-label {
    font-size: .7rem;
    letter-spacing: .1em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--spotlight-label);
    text-align: center;
    line-height: 1.2;
    margin-top: .5rem;
}

.esy-spotlight--editorial .esy-spotlight__content {
    flex: 1;
    border-left: 1px solid var(--spotlight-yellow);
    padding-left: 1.25rem;
}

/* Responsive: editorial collapses to stacked below 576px */
@media (max-width: 575.98px) {
    .esy-spotlight--editorial {
        flex-direction: column;
    }
    .esy-spotlight__mark {
        flex-direction: row;
        gap: .5rem;
        margin-right: 0;
        margin-bottom: .75rem;
    }
    .esy-spotlight__mark > .bi {
        font-size: 1.5rem;
    }
    .esy-spotlight__mark-label {
        margin-top: 0;
        text-align: left;
    }
    .esy-spotlight--editorial .esy-spotlight__content {
        border-left: none;
        border-top: 1px solid var(--spotlight-yellow);
        padding-left: 0;
        padding-top: .75rem;
    }
}
