/*
 * Cookie consent banner + preferences — AOL Consent Mode v2 (mu-plugin asset).
 * Equal-prominence Accept all / Reject all (ICO/PECR). Brand purple #50148F.
 */

/* Hide the banner once a choice is stored (class set by the head script, avoids CLS) */
.has-consent #aol-consent-banner { display: none; }

#aol-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: #ffffff;
    border-top: 3px solid #50148F;
    box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.18);
    padding: 18px 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #1c2b36;
}

#aol-consent-banner .aol-consent-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    justify-content: space-between;
}

#aol-consent-banner .aol-consent-text {
    flex: 1 1 420px;
    min-width: 260px;
}

#aol-consent-banner .aol-consent-text a {
    color: #50148F;
    text-decoration: underline;
}

#aol-consent-banner .aol-consent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

/* Accept all and Reject all MUST have equal visual weight (PECR equal prominence). */
.aol-consent-btn {
    appearance: none;
    border: 2px solid #50148F;
    background: #50148F;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 22px;
    border-radius: 6px;
    cursor: pointer;
    min-width: 130px;
    text-align: center;
}

.aol-consent-btn.aol-consent-reject {
    background: #ffffff;
    color: #50148F;
}

.aol-consent-btn:hover { opacity: 0.9; }

/* "Manage preferences" is a secondary text link, NOT a substitute for Reject. */
.aol-consent-manage {
    background: none;
    border: none;
    color: #50148F;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px 4px;
}

/* Preferences modal */
#aol-consent-prefs {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
}

#aol-consent-prefs.aol-open { display: flex; }

#aol-consent-prefs .aol-prefs-box {
    background: #fff;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 26px 28px;
}

#aol-consent-prefs h2 { margin: 0 0 12px; font-size: 20px; color: #50148F; }

.aol-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #e6ebef;
}

.aol-pref-row h3 { margin: 0 0 4px; font-size: 15px; }
.aol-pref-row p { margin: 0; font-size: 13px; color: #5a6b78; }

/* Toggle (green = on, an intuitive on/off affordance) */
.aol-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.aol-switch input { opacity: 0; width: 0; height: 0; }
.aol-slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #c4cdd5; border-radius: 26px; transition: 0.2s;
}
.aol-slider:before {
    content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: 0.2s;
}
.aol-switch input:checked + .aol-slider { background: #2e8b57; }
.aol-switch input:checked + .aol-slider:before { transform: translateX(20px); }
.aol-switch input:disabled + .aol-slider { background: #9fb0bd; cursor: not-allowed; }

.aol-prefs-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* Persistent re-open control (footer) */
#aol-consent-reopen {
    background: none; border: none; color: inherit; cursor: pointer;
    text-decoration: underline; font: inherit; padding: 0;
}

@media (max-width: 600px) {
    #aol-consent-banner .aol-consent-inner { flex-direction: column; align-items: stretch; }
    #aol-consent-banner .aol-consent-actions { justify-content: center; }
    .aol-consent-btn { flex: 1 1 auto; }
}
