#gst-ads-controls,
#gst-ads-dialog {
    box-sizing: border-box;
    font-family: "GST Montserrat", Montserrat, Arial, sans-serif;
    letter-spacing: 0;
    color: #202026;
}

#gst-ads-controls[hidden],
#gst-ads-dialog[hidden] {
    display: none !important;
}

#gst-ads-controls {
    padding: 0 20px env(safe-area-inset-bottom, 0px);
    text-align: center;
    background: #161620;
}

#gst-ads-controls button,
#gst-ads-dialog button {
    box-sizing: border-box;
    min-height: 46px;
    margin: 0;
    padding: 11px 20px;
    border: 1px solid #202026;
    border-radius: 6px;
    background: #202026;
    color: #fff;
    font: 600 14px/1.5 "GST Montserrat", Montserrat, Arial, sans-serif;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease;
}

#gst-ads-dialog button:hover {
    background: #3c3c46;
    border-color: #3c3c46;
}

#gst-ads-dialog button[data-gst-consent="reject"] {
    background: #fff;
    border-color: #8b8b92;
    color: #4d4d57;
}

#gst-ads-dialog button[data-gst-consent="reject"]:hover {
    background: #f3f3f5;
    border-color: #6f6f78;
}

#gst-ads-controls button:focus-visible,
#gst-ads-dialog button:focus-visible,
#gst-ads-dialog a:focus-visible {
    outline: 3px solid #a82435;
    outline-offset: 4px;
}

#gst-ads-dialog a:focus-visible {
    outline-offset: 1px;
}

#gst-ads-dialog {
    position: fixed;
    z-index: 2147483000;
    inset-inline: 20px;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    width: calc(100% - 40px);
    max-width: 1080px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px - env(safe-area-inset-bottom, 0px));
    margin-inline: auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d8dce0;
    border-radius: 8px;
    box-shadow: 0 8px 32px #17172424, 0 2px 6px #1717240a;
}

#gst-ads-dialog .gst-ads-inner {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    max-height: inherit;
    padding: 20px 24px;
}

#gst-ads-dialog .gst-ads-copy {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px;
}

#gst-ads-dialog h2 {
    margin: 0 0 6px;
    padding: 0;
    /* Divi's heading face is important; keep the utility title in the site's body face. */
    font-family: "GST Montserrat", Montserrat, Arial, sans-serif !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    color: #202026;
}

#gst-ads-dialog h2::before {
    display: inline-block;
    width: 3px;
    height: 14px;
    margin-right: 9px;
    border-radius: 1px;
    background: #b7283c;
    content: "";
}

#gst-ads-dialog p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #4d4d57;
}

#gst-ads-dialog a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-top: 2px;
    padding: 2px 0;
    color: #962536;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#gst-ads-dialog a:hover {
    color: #6c1825;
    text-decoration-thickness: 2px;
}

#gst-ads-dialog .gst-ads-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    gap: 10px;
    padding: 4px;
}

#gst-ads-controls button {
    min-height: 44px;
    padding: 9px 12px;
    border-color: transparent;
    border-radius: 3px;
    background: transparent;
    color: #e1e1e8;
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#gst-ads-controls button:hover {
    background: #272733;
    color: #fff;
}

#gst-ads-controls button:focus-visible {
    outline-color: #f4be5b;
    outline-offset: -3px;
}

#gst-ads-controls .gst-ads-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    #gst-ads-dialog {
        inset-inline: 12px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    }

    #gst-ads-dialog .gst-ads-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 14px;
    }

    #gst-ads-dialog .gst-ads-actions {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr));
    }

    #gst-ads-dialog button {
        padding-inline: 12px;
    }
}

@media (max-height: 600px) and (min-width: 500px) {
    #gst-ads-dialog .gst-ads-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: minmax(0, 1fr);
        gap: 12px;
        padding: 12px 16px;
    }

    #gst-ads-dialog .gst-ads-actions {
        grid-template-columns: minmax(100px, 1fr);
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #gst-ads-dialog *,
    #gst-ads-controls * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
