/* Cookie consent banner — Consent Mode v2 / AdSense / GA4 */

.npi-cc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    pointer-events: none;
}

.npi-cc[hidden] {
    display: none !important;
}

.npi-cc__panel {
    pointer-events: auto;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #1b3048;
    color: #e8eef5;
    border: 1px solid #2c4663;
    border-radius: 16px;
    box-shadow: 0 14px 44px rgba(8, 18, 32, 0.42);
    padding: 1.1rem 1.15rem 1.15rem;
    overflow: hidden;
}

.npi-cc__body {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.npi-cc__copy {
    min-width: 0;
}

.npi-cc__title {
    font-family: var(--font-display, system-ui, sans-serif);
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: #ffffff;
}

.npi-cc__text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #c5d2e2;
    margin: 0;
}

.npi-cc__text a {
    color: #9ec5ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.npi-cc__text a:hover {
    color: #cfe0ff;
}

.npi-cc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: stretch;
}

.npi-cc__actions--prefs {
    margin-top: 0.75rem;
    justify-content: flex-end;
}

.npi-cc__btn {
    appearance: none;
    border-radius: 10px;
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.75rem 1.2rem;
    min-height: 46px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-align: center;
}

.npi-cc__btn:focus-visible {
    outline: 2px solid #9ec5ff;
    outline-offset: 2px;
}

.npi-cc__btn--accept {
    background: #e4a853;
    color: #1a1a1a;
    border-color: #e4a853;
    flex: 1 1 auto;
}

.npi-cc__btn--accept:hover {
    background: #d4963c;
    border-color: #d4963c;
}

.npi-cc__btn--customize {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    flex: 1 1 auto;
}

.npi-cc__btn--customize:hover,
.npi-cc__btn--customize[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}

.npi-cc__btn--save {
    background: #e4a853;
    color: #1a1a1a;
    border-color: #e4a853;
    min-width: 10.5rem;
}

.npi-cc__btn--save:hover {
    background: #d4963c;
    border-color: #d4963c;
}

.npi-cc__prefs {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    max-height: min(42vh, 280px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.npi-cc__prefs[hidden] {
    display: none !important;
}

.npi-cc__fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
    display: grid;
    gap: 0.5rem;
}

.npi-cc__legend {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9eb0c4;
    margin-bottom: 0.15rem;
    float: none;
    width: auto;
    padding: 0;
}

.npi-cc__option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.7rem 0.8rem;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.npi-cc__option:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.npi-cc__option--locked,
.npi-cc__option--locked:hover {
    cursor: default;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.npi-cc__option input {
    margin-top: 0.2rem;
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    accent-color: #e4a853;
}

.npi-cc__option strong {
    display: block;
    font-size: 0.92rem;
    color: #ffffff;
    margin-bottom: 0.12rem;
}

.npi-cc__option-desc {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #b7c5d6;
}

@media (min-width: 768px) {
    .npi-cc {
        padding: 16px 20px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .npi-cc__panel {
        max-width: 920px;
        padding: 1.2rem 1.35rem 1.25rem;
    }

    .npi-cc__body {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.35rem;
    }

    .npi-cc__title {
        font-size: 1.25rem;
    }

    .npi-cc__actions {
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .npi-cc__btn--accept,
    .npi-cc__btn--customize {
        flex: 0 0 auto;
        min-width: 8.5rem;
    }

    .npi-cc__btn--accept {
        min-width: 9.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .npi-cc__prefs {
        max-height: none;
        overflow: visible;
    }

    .npi-cc__fieldset {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

@media (max-width: 767px) {
    .npi-cc__actions {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .npi-cc__btn--customize {
        order: 1;
        flex: 1 1 0;
    }

    .npi-cc__btn--accept {
        order: 2;
        flex: 1 1 0;
    }

    .npi-cc__actions--prefs .npi-cc__btn--save {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .npi-cc__btn,
    .npi-cc__option {
        transition: none;
    }
}
