.bsxp-dialog:not([open]),
.bsxp-banner[hidden] {
    display: none !important;
}

html.bsxp-modal-open {
    overflow: hidden;
}

.bsxp-dialog,
.bsxp-banner {
    box-sizing: border-box;
    color: #fff;
    background: #0a1325;
    border: 1px solid #e7ba59;
    border-radius: 14px;
    overflow: hidden;
    line-height: 1.35;
}

.bsxp-dialog {
    position: fixed;
    inset: 0;
    width: min(520px, calc(100% - 24px));
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 14px 56px #0009;
}

.bsxp-dialog::backdrop {
    background: #050810bf;
}

.bsxp-banner {
    width: min(100%, 520px);
    margin: 1rem auto;
}

.bsxp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px 4px 16px;
    background: #0a1325;
}

.bsxp-header .bsxp-title {
    margin: 0;
    color: #fff4d6;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.bsxp-header form {
    margin: 0;
}

.bsxp-header .bsxp-close {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    font: 28px/1 sans-serif;
    letter-spacing: 0;
    cursor: pointer;
}

.bsxp-header .bsxp-close:hover {
    background: #ffffff24;
}

.bsxp-dialog .bsxp-creative,
.bsxp-banner .bsxp-creative {
    display: block;
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.bsxp-creative img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.bsxp-dialog .bsxp-creative img {
    width: min(100%, max(160px, calc(100vh - 138px)));
    width: min(100%, max(160px, calc(100dvh - 138px)));
}

.bsxp-creative .bsxp-cta {
    display: grid;
    min-height: 46px;
    place-items: center;
    box-sizing: border-box;
    margin: 8px 12px 12px;
    padding: 6px 12px;
    border: 1px solid #f5c771;
    border-radius: 8px;
    color: #fff;
    background: #a30d16;
    font-size: 1rem;
    font-weight: 700;
}

.bsxp-creative:hover .bsxp-cta {
    background: #c21420;
}

.bsxp-dialog .bsxp-close:focus-visible,
.bsxp-dialog .bsxp-creative:focus-visible,
.bsxp-banner .bsxp-creative:focus-visible {
    outline: 3px solid #fff2a6;
    outline-offset: -4px;
}
