/* Cookie Consent Manager — GDPR granular */

/* Banner (layer 1) */
.cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-btn-settings {
    background: white !important;
    color: #2e7d4f !important;
    border: 1.5px solid #dce8dc !important;
}
.cookie-btn-settings:hover { background: #f5f8f5 !important; }

/* Modal Setări (layer 2) */
.cookie-settings-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: ccFadeIn 0.2s ease;
}
.cc-modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.cc-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    animation: ccSlideUp 0.25s ease;
    overflow: hidden;
}
.cc-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cc-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a1a1a;
}
.cc-modal-close {
    background: none; border: none;
    font-size: 28px; cursor: pointer; color: #999;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.15s;
}
.cc-modal-close:hover { background: #f0f0f0; color: #333; }
.cc-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.cc-modal-intro {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.6;
}
.cc-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    background: #f9fafb;
}
.cookie-btn-save {
    background: #2e7d4f !important;
    color: white !important;
    border: none !important;
}

/* Categorii */
.cc-category {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fafafa;
}
.cc-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.cc-category-title {
    flex: 1;
    font-size: 0.95rem;
    color: #1a1a1a;
}
.cc-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: #e8f5e9;
    color: #2e7d4f;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 600;
}
.cc-category-desc {
    font-size: 0.82rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
    padding-left: 56px;
}

/* Toggle switch */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    transition: 0.2s;
    border-radius: 24px;
}
.cc-toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-toggle input:checked + .cc-toggle-slider { background: #2e7d4f; }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(20px); }
.cc-toggle input:disabled + .cc-toggle-slider { background: #a0d3a0; cursor: not-allowed; }
.cc-toggle input:disabled + .cc-toggle-slider::before { background: #f0f0f0; }
.cc-toggle input:focus-visible + .cc-toggle-slider { outline: 2px solid #2e7d4f; outline-offset: 2px; }

/* Animații */
@keyframes ccFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes ccSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Mobile */
@media (max-width: 600px) {
    .cc-modal-content {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    .cookie-settings-modal {
        align-items: flex-end;
        padding: 0;
    }
    .cc-modal-header { padding: 16px 20px; }
    .cc-modal-body { padding: 16px 20px; }
    .cc-modal-footer {
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
    }
    .cc-modal-footer button {
        width: 100%;
        min-width: 0;
        font-size: 0.95rem;
        padding: 12px 16px;
        min-height: 48px;
    }
    .cc-category-desc { padding-left: 0; margin-top: 8px; }
}
