/* PSU consent banner restyled to look like the cookieconsent "cloud" SISx used before: a white floating card with
   the text on the left and two stacked buttons on the right, navy primary and light grey secondary. The library's
   own rules use single-class selectors, so .psu-consent-banner prefixes are enough to win. */
:root {
    --psu-consent-font-family: 'Noto Sans Thai', 'Helvetica', 'Arial', sans-serif;
    --psu-consent-text-color: #2d4156;
    --psu-consent-heading-color: #2d4156;
    --psu-consent-radius: 0.45rem;
    --psu-consent-radius-sm: 0.375rem;
}

.psu-consent-banner.psu-consent-banner-bottom-center {
    max-width: 50rem;
    border: none;
    box-shadow: 0 0.625rem 1.875rem rgba(2, 2, 3, 0.28);
}

.psu-consent-banner .psu-consent-banner-content {
    gap: 1.75rem;
    padding: 1.2rem 1.7rem;
}

.psu-consent-banner .sis-consent-heading {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d4156;
}

.psu-consent-banner .psu-consent-banner-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

.psu-consent-banner .psu-consent-banner-policy {
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.psu-consent-banner .psu-consent-banner-btn-group {
    flex: 0 0 14rem;
    flex-direction: column;
    gap: 0.5rem;
}

.psu-consent-banner .psu-consent-btn {
    width: 100%;
    padding: 0.85rem 1.45rem;
    font-size: 0.85rem;
    box-shadow: none;
}

.psu-consent-banner .psu-consent-accept-all,
.psu-consent-modal .psu-consent-accept-all {
    background-color: #2d4156;
    color: #fff;
    box-shadow: none;
}

.psu-consent-banner .psu-consent-accept-all:hover,
.psu-consent-modal .psu-consent-accept-all:hover {
    background-color: #1d2e38;
    color: #fff;
}

.psu-consent-banner .psu-consent-manage-preferences,
.psu-consent-modal .psu-consent-btn-save {
    background-color: #eaeff2;
    color: #2d4156;
}

.psu-consent-banner .psu-consent-manage-preferences:hover,
.psu-consent-modal .psu-consent-btn-save:hover {
    background-color: #d8e0e6;
}

/* Phone: text above, full-width buttons below, as the old card did. */
@media (max-width: 688px) {
    .psu-consent-banner .psu-consent-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.2rem;
    }

    .psu-consent-banner .psu-consent-banner-btn-group {
        flex-basis: auto;
    }
}

/* Below MudBlazor's md breakpoint (the drawer's) the floating cookie button would cover page content and the
   bottom of dialogs. Cookie settings stay reachable from the footer. */
@media (max-width: 959.98px) {
    .psu-consent-edit-button {
        display: none !important;
    }
}

/* The footer's "Cookie settings" button opens the PSU modal, which exists only once the banner has started
   (production host, consent API reachable). */
html:not(.psu-consent-ready) [data-cc="c-settings"] {
    display: none !important;
}

/* The banner sits on top and covers a dialog's buttons on a phone. A dialog is the task the visitor came for,
   so the banner waits until it closes. No consent is recorded while it is hidden. */
html:has(.mud-dialog-container) .psu-consent-banner {
    display: none !important;
}

@media print {
    .psu-consent-banner,
    .psu-consent-modal,
    .psu-consent-edit-button {
        display: none !important;
    }
}
