/* NopTech GDPR - the consent manager (vendor/silktide-consent-manager.css) for a shop: a card in the colours of the settings
   (the variables are set inline on #stcm-wrapper), the page's font, Accept and Reject alike, above the theme's sticky
   headers while open, compact on a phone, and no credit links. */

#stcm-wrapper {
    --fontFamily: inherit;
    --boxShadow: 0 18px 50px -12px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15, 23, 42, .06);
    --backdropBackgroundColor: rgba(15, 23, 42, .45);
}

/* above everything while the banner or the settings are open (themes give their sticky headers huge z-indexes); the
   button on its own stays under the menus and popups */
#stcm-wrapper:has(#stcm-banner),
#stcm-wrapper:has(#stcm-modal[style*="flex"]) {
    z-index: 2147483647;
}

#stcm-wrapper #stcm-banner,
#stcm-wrapper #stcm-modal {
    box-shadow: var(--boxShadow);
    border-radius: 14px;
}

#stcm-wrapper #stcm-banner p,
#stcm-wrapper #stcm-modal p {
    font-size: 15px;
    line-height: 1.55;
}

#stcm-wrapper #stcm-banner a,
#stcm-wrapper #stcm-modal a {
    color: var(--primaryColor);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Accept and Reject: the same size, colour and weight (the authorities ask for equal weight) */
#stcm-wrapper .stcm-button {
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--backgroundColor);
    background-color: var(--primaryColor);
}

#stcm-wrapper .stcm-button:hover {
    filter: brightness(1.1);
}

/* the title of the settings: gdpr-consent.js makes the manager's <h1> a paragraph, this gives it the h1's look */
#stcm-wrapper #stcm-modal .stcm-title {
    font-family: var(--fontFamily);
    color: var(--textColor);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
    opacity: 1;
}

/* the focus ring for the keyboard only, not after a tap */
#stcm-wrapper a:focus:not(:focus-visible),
#stcm-wrapper #stcm-banner button:focus:not(:focus-visible),
#stcm-wrapper #stcm-modal button:focus:not(:focus-visible),
#stcm-wrapper #stcm-icon:focus:not(:focus-visible) {
    box-shadow: none;
}

/* no links to the maker of the manager in a shop's banner (the MIT license asks only for its notice in the files) */
#stcm-wrapper .stcm-logo,
#stcm-wrapper .stcm-credit-link {
    display: none !important;
}

#stcm-wrapper #stcm-banner {
    width: 640px;
}

@media (min-width: 600px) {
    #stcm-wrapper #stcm-banner .stcm-actions,
    #stcm-wrapper #stcm-modal footer {
        flex-wrap: wrap;
    }

    #stcm-wrapper #stcm-banner .stcm-button,
    #stcm-wrapper #stcm-modal .stcm-button {
        white-space: nowrap;
    }
}

/* on a phone: the whole text and both choices side by side, Settings under them, with little room around them; the
   settings take the whole screen and scroll inside */
@media (max-width: 599px) {
    #stcm-wrapper #stcm-banner {
        right: 10px;
        bottom: 10px;
        padding: 16px 16px 8px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }

    #stcm-wrapper #stcm-banner p {
        margin-bottom: 10px;
        font-size: 13.5px;
        line-height: 1.45;
    }

    #stcm-wrapper #stcm-banner .stcm-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 0;
    }

    #stcm-wrapper #stcm-banner .stcm-actions-row {
        grid-column: 1 / -1;
    }

    #stcm-wrapper #stcm-banner .stcm-button {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 9px 8px;
        font-size: 14px;
        line-height: 1.25;
        white-space: normal;
    }

    #stcm-wrapper #stcm-modal {
        height: 100%;
        border-radius: 0;
    }
}
