/**
 * ConsentManager — Buildbase TCO-calculator (donker thema, groen accent)
 */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #18181c;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #f0eff4;
    display: none;
}

.cookie-banner__content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.cookie-banner__text { flex: 1; min-width: 0; }

.cookie-banner__title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #3dbf8a;
}

.cookie-banner__description {
    margin: 0;
    color: rgba(240, 239, 244, 0.88);
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-banner__btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    white-space: nowrap;
}

.cookie-banner__btn:focus-visible {
    outline: 2px solid #3dbf8a;
    outline-offset: 2px;
}

.cookie-banner__btn--primary {
    background: #3dbf8a;
    color: #0f0f11;
}

.cookie-banner__btn--primary:hover {
    background: #4dd49a;
}

.cookie-banner__btn--secondary {
    background: #222228;
    color: #f0eff4;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.cookie-banner__btn--secondary:hover {
    background: #2a2a32;
    border-color: rgba(61, 191, 138, 0.45);
}

.cookie-banner__btn--settings {
    background: transparent;
    color: #3dbf8a;
    text-decoration: underline;
    padding: 8px 12px;
    min-width: auto;
}

.cookie-banner__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: rgba(240, 239, 244, 0.55);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
}

.cookie-banner__close:hover { color: #f0eff4; }
.cookie-banner__close:focus-visible { outline: 2px solid #3dbf8a; outline-offset: 2px; }

.cookie-settings {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: none;
}

.cookie-settings__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.cookie-settings__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #18181c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    font-family: 'DM Sans', -apple-system, sans-serif;
    color: #f0eff4;
}

.cookie-settings__header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-settings__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #3dbf8a;
}

.cookie-settings__close {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(240, 239, 244, 0.55);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
}

.cookie-settings__close:hover { color: #f0eff4; }
.cookie-settings__close:focus-visible { outline: 2px solid #3dbf8a; outline-offset: 2px; }

.cookie-settings__body { padding: 24px; }

.cookie-settings__section-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #3dbf8a;
}

.cookie-settings__section-description {
    margin: 0 0 16px 0;
    color: rgba(240, 239, 244, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

.cookie-settings__toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #f0eff4;
}

.cookie-settings__toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-settings__toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #2a2a32;
    border-radius: 12px;
    transition: background 0.3s ease;
    margin-right: 12px;
    flex-shrink: 0;
}

.cookie-settings__toggle-slider:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

.cookie-settings__toggle-input:checked + .cookie-settings__toggle-slider {
    background: #3dbf8a;
}

.cookie-settings__toggle-input:checked + .cookie-settings__toggle-slider:before {
    transform: translateX(20px);
}

.cookie-settings__footer {
    padding: 20px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-settings__btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    min-width: 100px;
}

.cookie-settings__btn--primary {
    background: #3dbf8a;
    color: #0f0f11;
}

.cookie-settings__btn--primary:hover { background: #4dd49a; }

.cookie-settings__btn--secondary {
    background: #222228;
    color: #f0eff4;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.cookie-settings__btn--secondary:hover { background: #2a2a32; }

@media (max-width: 768px) {
    .cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
    }
    .cookie-banner__actions { justify-content: center; flex-wrap: wrap; }
    .cookie-banner__btn { flex: 1; min-width: 120px; }
    .cookie-banner__close { position: static; align-self: flex-end; margin-bottom: -8px; }
    .cookie-settings__content { width: 95%; margin: 20px; max-height: calc(100vh - 40px); }
    .cookie-settings__footer { flex-direction: column; }
    .cookie-settings__btn { width: 100%; }
}

@media (max-width: 480px) {
    .cookie-settings__content { width: 100%; height: 100%; border-radius: 0; margin: 0; max-height: 100vh; }
}

@media print {
    .cookie-banner, .cookie-settings { display: none !important; }
}
