/* Janela de banner (compatível com XGT Theme e com temas comuns). */
#hgbp-modal {
    position: fixed;
    inset: 0;
    width: fit-content;
    height: fit-content;
    max-width: calc(100% - 24px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--stroke, rgba(255, 255, 255, .15));
    border-radius: 16px;
    background: var(--card-2, #111);
    box-shadow: 0 16px 65px rgba(0, 0, 0, .55), 0 0 35px rgba(138, 43, 226, .20);
    overflow: hidden;
    color: var(--text, #fff);
}
#hgbp-modal:not([open]) { display: none; }
#hgbp-modal::backdrop { background: rgba(4, 3, 13, .80); }
#hgbp-modal .hgbp-link { display: block; }
#hgbp-modal .hgbp-link:focus-visible { outline: 3px solid var(--cyan, #21d4fd); outline-offset: -4px; }
#hgbp-modal .hgbp-link img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(680px, calc(100vw - 24px));
    max-height: min(670px, 76vh);
    max-height: min(670px, 76dvh);
    object-fit: contain;
}
#hgbp-modal .hgbp-dismiss {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    margin: 0;
}
#hgbp-modal .hgbp-close {
    position: relative;
    isolation: isolate;
    display: grid;
    width: 48px;
    height: 48px;
    min-height: 0;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: 700 22px/1 system-ui, sans-serif;
    cursor: pointer;
}
#hgbp-modal .hgbp-close::before {
    content: "";
    position: absolute;
    inset: 6px;
    z-index: -1;
    border-radius: 50%;
    background: #d0001b; /* Fundo vermelho de fechamento, com X branco em alto contraste. */
    box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
#hgbp-modal .hgbp-close:hover,
#hgbp-modal .hgbp-close:focus,
#hgbp-modal .hgbp-close:active { color: #fff; }
#hgbp-modal .hgbp-close:focus-visible { outline: none; }
#hgbp-modal .hgbp-close:focus-visible::before { outline: 2px solid var(--cyan, #21d4fd); outline-offset: 2px; }

/* Posicionamento nativo: após o card do grupo, antes dos relacionados. */
#hgbp-inline[hidden] { display: none !important; }
#hgbp-inline.hgbp-xgt-banner {
    width: 100%;
    max-width: 1050px;
    margin: 28px auto 0;
    padding: clamp(16px, 3vw, 26px);
    background: linear-gradient(125deg, rgba(138, 43, 226, .16), rgba(255, 62, 165, .10) 55%, rgba(33, 212, 253, .06)), var(--card-2, #10162a);
    border: 1px solid rgba(255, 62, 165, .23);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .24), 0 0 18px rgba(138, 43, 226, .10);
    overflow: hidden;
    box-sizing: border-box;
}
#hgbp-inline .hgbp-xgt-banner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0 0 16px;
}
#hgbp-inline .hgbp-xgt-banner-tag {
    color: var(--rose, #ff3ea5);
    font: 800 12px/1.5 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}
#hgbp-inline .hgbp-xgt-banner-description {
    color: var(--muted, #a7a7c8);
    font: 400 13px/1.5 Arial, sans-serif;
}
#hgbp-inline .hgbp-xgt-banner-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}
#hgbp-inline .hgbp-xgt-banner-link:focus-visible { outline: 3px solid var(--cyan, #21d4fd); outline-offset: 4px; }
#hgbp-inline .hgbp-xgt-banner-link img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}
@media (max-width: 640px) {
    #hgbp-inline.hgbp-xgt-banner { margin-top: 22px; padding: 16px; border-radius: 16px; }
    #hgbp-inline .hgbp-xgt-banner-description { font-size: 12px; }
    #hgbp-inline .hgbp-xgt-banner-link img { max-height: 60vh; }
}
@media (prefers-reduced-motion: no-preference) {
    #hgbp-modal[open] { animation: hgbp-enter 180ms ease-out both; }
    #hgbp-modal[open].hgbp-closing { animation: hgbp-exit 150ms ease-in both; }
    #hgbp-modal[open]::backdrop { animation: hgbp-backdrop-in 180ms ease-out both; }
    #hgbp-modal[open].hgbp-closing::backdrop { animation: hgbp-backdrop-out 150ms ease-in both; }
}
@keyframes hgbp-enter { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes hgbp-exit { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes hgbp-backdrop-in { from { opacity: 0; } }
@keyframes hgbp-backdrop-out { to { opacity: 0; } }
