/* NGM Cookie Consent — Cookiebot-inspired design */

:root {
    --ngm-cc-primary: #1a1a1a;
    --ngm-cc-accent: #3b82f6;
    --ngm-cc-accent-hover: #2563eb;
    --ngm-cc-bg: #ffffff;
    --ngm-cc-border: #e5e7eb;
    --ngm-cc-text: #374151;
    --ngm-cc-text-light: #6b7280;
    --ngm-cc-radius: 8px;
    --ngm-cc-shadow: 0 4px 24px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
    --ngm-cc-z: 999999;
}

/* ── Utilities ── */
.ngm-cc-hidden { display: none !important; }

/* ── Banner ── */
.ngm-cc-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 860px;
    background: var(--ngm-cc-bg);
    border: 1px solid var(--ngm-cc-border);
    border-radius: var(--ngm-cc-radius);
    box-shadow: var(--ngm-cc-shadow);
    z-index: var(--ngm-cc-z);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    animation: ngm-cc-slide-up .3s ease;
}

@keyframes ngm-cc-slide-up {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ngm-cc-banner__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

.ngm-cc-banner__logo {
    flex-shrink: 0;
    color: var(--ngm-cc-accent);
    display: flex;
    align-items: center;
}

.ngm-cc-banner__content {
    flex: 1;
    min-width: 0;
}

.ngm-cc-banner__title {
    font-weight: 600;
    color: var(--ngm-cc-primary);
    margin: 0 0 2px;
    font-size: 14px;
}

.ngm-cc-banner__text {
    margin: 0;
    color: var(--ngm-cc-text-light);
    font-size: 13px;
}

.ngm-cc-privacy-link {
    color: var(--ngm-cc-accent);
    text-decoration: none;
    margin-left: 4px;
}
.ngm-cc-privacy-link:hover { text-decoration: underline; }
.ngm-cc-privacy-link:empty { display: none; }

.ngm-cc-banner__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Buttons ── */
.ngm-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

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

.ngm-cc-btn--secondary {
    background: transparent;
    color: var(--ngm-cc-text);
    border: 1px solid var(--ngm-cc-border);
}
.ngm-cc-btn--secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.ngm-cc-btn--ghost {
    background: transparent;
    color: var(--ngm-cc-text-light);
    padding-left: 8px;
    padding-right: 8px;
    border: none;
}
.ngm-cc-btn--ghost:hover { color: var(--ngm-cc-primary); }

/* ── Modal ── */
.ngm-cc-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--ngm-cc-z) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ngm-cc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
}

.ngm-cc-modal__box {
    position: relative;
    background: var(--ngm-cc-bg);
    border-radius: 12px;
    box-shadow: var(--ngm-cc-shadow);
    width: 100%;
    max-width: 520px;
    margin: 16px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    animation: ngm-cc-modal-in .25s ease;
}

@keyframes ngm-cc-modal-in {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

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

.ngm-cc-modal__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ngm-cc-primary);
    margin: 0;
}

.ngm-cc-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--ngm-cc-text-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s;
}
.ngm-cc-modal__close:hover { color: var(--ngm-cc-primary); background: #f3f4f6; }

.ngm-cc-modal__body {
    padding: 8px 0;
}

.ngm-cc-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--ngm-cc-border);
}

/* ── Category row ── */
.ngm-cc-category {
    padding: 16px 24px;
    border-bottom: 1px solid var(--ngm-cc-border);
}
.ngm-cc-category:last-child { border-bottom: none; }

.ngm-cc-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ngm-cc-category__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ngm-cc-primary);
}

.ngm-cc-category__desc {
    font-size: 13px;
    color: var(--ngm-cc-text-light);
    margin: 0;
    line-height: 1.5;
}

/* ── Toggle switch ── */
.ngm-cc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.ngm-cc-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ngm-cc-toggle__track {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #d1d5db;
    transition: background .2s;
    flex-shrink: 0;
}

.ngm-cc-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .2s;
}

.ngm-cc-toggle__input:checked ~ .ngm-cc-toggle__track { background: var(--ngm-cc-accent); }
.ngm-cc-toggle__input:checked ~ .ngm-cc-toggle__track .ngm-cc-toggle__thumb { transform: translateX(18px); }

.ngm-cc-toggle--locked .ngm-cc-toggle__track { background: var(--ngm-cc-accent); opacity: .6; cursor: not-allowed; }
.ngm-cc-toggle--locked .ngm-cc-toggle__thumb { transform: translateX(18px); }
.ngm-cc-toggle--locked .ngm-cc-toggle__label {
    font-size: 12px;
    color: var(--ngm-cc-text-light);
    font-style: italic;
}

/* ── Footer reopen link (text fallback, ascuns când badge e activ) ── */
.ngm-cc-footer-link { display: none; }

/* ── Cookie badge fix ── */
#ngm-cc-reopen.ngm-cc-badge { display: none; }
#ngm-cc-reopen.ngm-cc-badge:not(.ngm-cc-hidden) { display: flex; }

.ngm-cc-badge {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: calc(var(--ngm-cc-z) - 1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ngm-cc-bg);
    border: 1px solid var(--ngm-cc-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s;
    color: var(--ngm-cc-text-light);
}
.ngm-cc-badge:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    transform: scale(1.08);
    color: var(--ngm-cc-accent);
}
.ngm-cc-badge svg { display: block; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .ngm-cc-banner {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: var(--ngm-cc-radius) var(--ngm-cc-radius) 0 0;
        transform: none;
        max-width: 100%;
    }

    .ngm-cc-banner__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .ngm-cc-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }
}
