/*--------------------------------------------------------------
# NarneTech Cookie Consent — DPDP Act 2023 compliant
# Namespaced under .nt-cc- to avoid collisions with site styles.
--------------------------------------------------------------*/
:root {
    --nt-cc-primary: #4154f1;
    --nt-cc-primary-dark: #2f3fd0;
    --nt-cc-navy: #012970;
    --nt-cc-text: #1f2937;
    --nt-cc-muted: #6b7280;
    --nt-cc-border: #e5e7eb;
    --nt-cc-bg: #ffffff;
    --nt-cc-radius: 16px;
    --nt-cc-shadow: 0 20px 60px rgba(1, 41, 112, 0.18);
}

/* Hidden until JS decides to show it (prevents flash for returning visitors) */
.nt-cc-hidden { display: none !important; }

/*--------------------------------------------------------------
# Banner
--------------------------------------------------------------*/
.nt-cc-banner {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(12px);
    width: min(960px, calc(100% - 32px));
    background: var(--nt-cc-bg);
    color: var(--nt-cc-text);
    border: 1px solid var(--nt-cc-border);
    border-radius: var(--nt-cc-radius);
    box-shadow: var(--nt-cc-shadow);
    z-index: 2147483000;
    padding: 22px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
    font-family: "Open Sans", system-ui, -apple-system, sans-serif;
}

.nt-cc-banner.nt-cc-show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nt-cc-banner__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.nt-cc-banner__icon {
    font-size: 22px;
    color: var(--nt-cc-primary);
    line-height: 1;
}

.nt-cc-banner__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--nt-cc-navy);
    margin: 0;
}

.nt-cc-banner__text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--nt-cc-muted);
    margin: 0 0 16px;
}

.nt-cc-banner__text a {
    color: var(--nt-cc-primary);
    font-weight: 600;
    text-decoration: underline;
}

.nt-cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

/*--------------------------------------------------------------
# Buttons — "Accept all" and "Reject all" are visually equal
# (DPDP: withdrawing/declining must be as easy as accepting)
--------------------------------------------------------------*/
.nt-cc-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
    font-family: inherit;
}

.nt-cc-btn:focus-visible {
    outline: 3px solid rgba(65, 84, 241, .35);
    outline-offset: 2px;
}

.nt-cc-btn--primary {
    background: var(--nt-cc-primary);
    color: #fff;
}
.nt-cc-btn--primary:hover { background: var(--nt-cc-primary-dark); }

.nt-cc-btn--solid {
    background: #eef1ff;
    color: var(--nt-cc-navy);
    border-color: #dfe4ff;
}
.nt-cc-btn--solid:hover { background: #e2e7ff; }

.nt-cc-btn--ghost {
    background: transparent;
    color: var(--nt-cc-muted);
    border-color: var(--nt-cc-border);
}
.nt-cc-btn--ghost:hover { color: var(--nt-cc-navy); border-color: #cbd5e1; }

.nt-cc-actions .nt-cc-btn--link {
    background: transparent;
    color: var(--nt-cc-primary);
    border: none;
    padding: 11px 8px;
    text-decoration: underline;
    margin-right: auto; /* pushes accept/reject to the right */
}

/*--------------------------------------------------------------
# Preferences modal
--------------------------------------------------------------*/
.nt-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(1, 41, 112, .55);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

.nt-cc-modal.nt-cc-show { opacity: 1; visibility: visible; }

.nt-cc-modal__card {
    background: var(--nt-cc-bg);
    width: min(640px, 100%);
    max-height: min(88vh, 760px);
    border-radius: var(--nt-cc-radius);
    box-shadow: var(--nt-cc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(14px) scale(.98);
    transition: transform .3s ease;
    font-family: "Open Sans", system-ui, -apple-system, sans-serif;
}

.nt-cc-modal.nt-cc-show .nt-cc-modal__card { transform: translateY(0) scale(1); }

.nt-cc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--nt-cc-border);
}

.nt-cc-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--nt-cc-navy);
    margin: 0;
}

.nt-cc-modal__close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--nt-cc-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}
.nt-cc-modal__close:hover { background: #f3f4f6; color: var(--nt-cc-navy); }

.nt-cc-modal__body {
    padding: 20px 24px;
    overflow-y: auto;
}

.nt-cc-modal__intro {
    font-size: 14px;
    line-height: 1.55;
    color: var(--nt-cc-muted);
    margin: 0 0 18px;
}
.nt-cc-modal__intro a { color: var(--nt-cc-primary); font-weight: 600; }

/* Category rows */
.nt-cc-cat {
    border: 1px solid var(--nt-cc-border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
}

.nt-cc-cat__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.nt-cc-cat__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--nt-cc-navy);
    margin: 0 0 4px;
}

.nt-cc-cat__desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--nt-cc-muted);
    margin: 0;
}

.nt-cc-cat__badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--nt-cc-primary);
    white-space: nowrap;
}

/* Toggle switch */
.nt-cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.nt-cc-switch input { opacity: 0; width: 0; height: 0; }
.nt-cc-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .25s ease;
}
.nt-cc-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.nt-cc-switch input:checked + .nt-cc-slider { background: var(--nt-cc-primary); }
.nt-cc-switch input:checked + .nt-cc-slider::before { transform: translateX(20px); }
.nt-cc-switch input:disabled + .nt-cc-slider { background: var(--nt-cc-primary); opacity: .55; cursor: not-allowed; }
.nt-cc-switch input:focus-visible + .nt-cc-slider { outline: 3px solid rgba(65,84,241,.35); outline-offset: 2px; }

.nt-cc-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid var(--nt-cc-border);
    justify-content: flex-end;
}
.nt-cc-modal__footer .nt-cc-btn--ghost { margin-right: auto; }

/*--------------------------------------------------------------
# Persistent "Cookie settings" re-open button
--------------------------------------------------------------*/
.nt-cc-reopen {
    position: fixed;
    right: 17px;
    bottom: 200px;
    z-index: 2147482999;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--nt-cc-bg);
    border: 1px solid var(--nt-cc-border);
    box-shadow: 0 6px 20px rgba(1, 41, 112, .16);
    color: var(--nt-cc-primary);
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
.nt-cc-reopen:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(1, 41, 112, .24); }
.nt-cc-reopen.nt-cc-show { display: flex; }

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 576px) {
    .nt-cc-banner { bottom: 12px; padding: 18px 18px; }
    .nt-cc-actions { justify-content: stretch; }
    .nt-cc-actions .nt-cc-btn { flex: 1 1 100%; text-align: center; }
    .nt-cc-actions .nt-cc-btn--link { flex-basis: 100%; margin-right: 0; order: 3; }
    .nt-cc-modal__footer .nt-cc-btn { flex: 1 1 100%; }
    .nt-cc-modal__footer .nt-cc-btn--ghost { margin-right: 0; }
}
