/*
 * Cookie consent banner styling (TODO-0010).
 *
 * Pairs with templates/cookieconsent/banner.phtml and
 * /pub/js/cookie-consent.js. The banner is hidden by default and made
 * visible by JS (.cc-banner--visible). Two sub-modes -- "initial" (three
 * buttons: Accept all / Reject all / Settings) and "settings" (per-category
 * toggles) -- are switched via the data-mode attribute on #cookie-consent.
 *
 * Colour palette deliberately echoes the existing site colours from
 * /pub/css/default.css (#356b96 brand blue, #284f70 active hover) so the
 * banner does not feel like a third-party drop-in.
 *
 * Buttons: equal width, equal contrast, no dark patterns -- one of the
 * acceptance criteria of TODO-0010 and a UX commitment in the locked
 * Cookie Policy v1.0.0.
 */

.cc-banner {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    margin: 0 auto;
    max-width: 680px;
    padding: 18px 22px;
    background: #ffffff;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    color: #222222;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    z-index: 9999;
}

.cc-banner--visible {
    display: block;
}

.cc-banner .cc-title {
    margin: 0 0 8px;
    color: #222222;
    font-size: 16px;
    font-weight: 700;
}

.cc-banner .cc-message {
    margin: 0 0 12px;
}

.cc-banner .cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cc-banner .cc-btn {
    flex: 1 1 30%;
    min-width: 110px;
    padding: 10px 14px;
    background: #356b96;
    border: 1px solid #356b96;
    border-radius: 4px;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.cc-banner .cc-btn:hover,
.cc-banner .cc-btn:focus {
    background: #284f70;
    border-color: #284f70;
    outline: none;
}

.cc-banner .cc-btn-settings,
.cc-banner .cc-btn-back {
    background: #ffffff;
    color: #356b96;
}

.cc-banner .cc-btn-settings:hover,
.cc-banner .cc-btn-settings:focus,
.cc-banner .cc-btn-back:hover,
.cc-banner .cc-btn-back:focus {
    background: #f0f4f8;
    color: #284f70;
}

.cc-banner .cc-link {
    margin: 8px 0 0;
    font-size: 12px;
}

.cc-banner .cc-link a {
    color: #356b96;
}

.cc-banner .cc-categories {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.cc-banner .cc-category {
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid #ececec;
}

.cc-banner .cc-category:first-child {
    border-top: 0;
}

.cc-banner .cc-cat-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.cc-banner .cc-cat-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.cc-banner .cc-cat-toggle input[type="checkbox"][disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

.cc-banner .cc-cat-label {
    margin-left: 8px;
    font-weight: 700;
}

.cc-banner .cc-cat-desc {
    margin: 4px 0 0;
    color: #555555;
    font-size: 13px;
    line-height: 1.45;
}

/* Sub-mode visibility -- switched by JS via data-mode on #cookie-consent. */
.cc-banner[data-mode="initial"] .cc-settings { display: none; }
.cc-banner[data-mode="initial"] .cc-initial  { display: block; }
.cc-banner[data-mode="settings"] .cc-initial { display: none; }
.cc-banner[data-mode="settings"] .cc-settings { display: block; }

/* Footer "Cookie settings" trigger -- inherits the existing footer link
 * styling from default.css; this rule just keeps a clickable cursor on
 * the empty-href anchor used to wire up the JS handler. */
[data-cc-trigger] {
    cursor: pointer;
}

@media (max-width: 640px) {
    .cc-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 14px 16px;
        font-size: 13px;
    }

    .cc-banner .cc-buttons {
        flex-direction: column;
    }

    .cc-banner .cc-btn {
        flex: 1 1 100%;
        min-width: auto;
    }
}
