/*!
 * OnNetwork Legal Consent — styles
 * Cookie banner + preferences modal.
 * Reject is intentionally equal weight to Accept (CIPA / dark-pattern guidance).
 */

.onc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483646; /* one below max to allow rare critical overlays above */
    background: #ffffff;
    color: #1d1d1f;
    border-top: 1px solid #d8d8d8;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.onc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

@media (min-width: 900px) {
    .onc-banner__inner {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }
}

.onc-banner__text {
    flex: 1 1 auto;
    min-width: 0;
}

.onc-banner__title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #111;
}

.onc-banner__body {
    color: #333;
}

.onc-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

@media (min-width: 900px) {
    .onc-banner__actions {
        flex-wrap: nowrap;
    }
}

/* Buttons.
   Primary is used for BOTH Accept All and Reject All to keep them visually
   equal weight (per CIPA case law). Secondary "Manage Preferences" is the
   only visually distinct one — and only because it leads to more controls,
   not because it's the desired path. */

.onc-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    min-width: 140px;
}

.onc-btn:focus {
    outline: 2px solid #1979ff;
    outline-offset: 2px;
}

.onc-btn--primary {
    background: #1979ff;
    color: #ffffff;
    border-color: #1979ff;
}

.onc-btn--primary:hover {
    background: #1466da;
    border-color: #1466da;
}

.onc-btn--secondary {
    background: #ffffff;
    color: #1979ff;
    border-color: #1979ff;
}

.onc-btn--secondary:hover {
    background: #f0f6ff;
}

/* Modal */

.onc-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onc-modal__dialog {
    background: #ffffff;
    color: #1d1d1f;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    padding: 28px;
    position: relative;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.onc-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.onc-modal__close:hover {
    background: #f3f3f3;
}

.onc-modal__close:focus,
.onc-modal__close:focus-visible {
    outline: 2px solid #1979ff;
    outline-offset: 2px;
    background: #f3f3f3;
}

.onc-modal__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111;
}

.onc-modal__intro {
    color: #333;
    margin: 0 0 16px;
}

.onc-modal__gpc {
    background: #eef5ff;
    border: 1px solid #c4d8f7;
    color: #143b76;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.onc-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 0;
    border-top: 1px solid #ececec;
}

.onc-row:last-of-type {
    border-bottom: 1px solid #ececec;
}

.onc-row__text {
    flex: 1 1 auto;
    min-width: 0;
}

.onc-row__label {
    display: block;
    font-weight: 600;
    color: #111;
    margin-bottom: 2px;
    cursor: pointer;
}

.onc-row--locked .onc-row__label {
    cursor: default;
}

.onc-row__desc {
    color: #555;
    font-size: 13px;
}

.onc-row__toggle {
    flex: 0 0 auto;
    padding-top: 2px;
}

.onc-row__toggle input[type="checkbox"] {
    /* WCAG 2.5.5 (AAA) / Apple HIG: minimum 24×24 touch target for interactive elements. */
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.onc-row--locked .onc-row__toggle input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0.6;
}

.onc-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .onc-modal__actions {
        flex-direction: column;
    }
    .onc-modal__actions .onc-btn {
        width: 100%;
    }
}

/* ---- Footer legal block (rendered by Footer.cshtml) ---- */

.legal-footer {
    background: #f7f7f8;
    border-top: 1px solid #e6e6e8;
    padding: 28px 0 18px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    font-size: 13px;
}

.legal-footer__heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin: 0 0 10px;
}

.legal-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: center;
}

.legal-footer__list li {
    display: inline-block;
}

.legal-footer__list a {
    color: #1d1d1f;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    padding: 2px 0;
}

.legal-footer__list a:hover,
.legal-footer__list a:focus {
    color: #1979ff;
    border-bottom-color: #1979ff;
}

.legal-footer__notice {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin: 14px 0 0;
}

.legal-footer__noscript {
    background: #fff8e1;
    border: 1px solid #f0d27a;
    color: #5a4500;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    margin-bottom: 14px;
}

/* WCAG 2.1 SC 2.4.1 — skip-navigation link, visible only when keyboard-focused. */
.legal-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    background: #1979ff;
    color: #fff;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.legal-skip-link:focus,
.legal-skip-link:focus-visible {
    left: 0;
    outline: 3px solid #ffd54a;
    outline-offset: -3px;
}
