/* Banner cookies - paleta unică: albastru #1755C9 / #0F3F9C, chenare #E3E3E3, fără turcoaz */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid #E3E3E3;
    max-height: 90vh;
    overflow-y: auto;
}

#cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.cookie-banner-text {
    min-width: 0; /* Pentru text-wrap corect */
}

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #222222;
    line-height: 1.3;
}

.cookie-banner-text p {
    margin: 0;
    color: #6B6B6B;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-banner-actions button {
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.5rem);
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
}

/* Butoanele sunt restrânse la banner (nu mai redefinesc .btn-* pe tot site-ul) */
#cookie-consent-banner .btn-primary {
    background: #1755C9;
    color: #fff;
}

#cookie-consent-banner .btn-primary:hover {
    background: #0F3F9C;
}

#cookie-consent-banner .btn-secondary {
    background: #fff;
    color: #222;
    border: 1px solid #CFCFCF;
}

#cookie-consent-banner .btn-secondary:hover {
    border-color: #1755C9;
    color: #1755C9;
}

#cookie-consent-banner .btn-outline {
    background: #fff;
    color: #1755C9;
    border: 1px solid #1755C9;
}

#cookie-consent-banner .btn-outline:hover {
    background: #F2F6FD;
}
/* Settings Panel */
.cookie-settings-panel {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    border-top: 1px solid #E3E3E3;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-settings-panel h3 {
    margin: 0 0 1.25rem 0;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: #222222;
}

/* Grid responsive pentru categorii */
.cookie-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-category {
    padding: 1rem;
    background: #F2F3F5;
    border-radius: 4px;
    border: 1px solid #E3E3E3;
    transition: all 0.2s;
}

.cookie-category:hover {
    border-color: #1755C9;
    box-shadow: none;
}

.cookie-category label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.8vw, 0.95rem);
}

.cookie-category input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.cookie-category input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

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

.cookie-category strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #222222;
}

.cookie-category p {
    margin: 0;
    font-size: clamp(0.8rem, 1.6vw, 0.85rem);
    color: #6B6B6B;
    line-height: 1.4;
}

.cookie-settings-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E3E3E3;
}

.cookie-settings-actions button {
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1.25rem, 3vw, 1.75rem);
}

.cookie-settings-actions a {
    color: #1755C9;
    text-decoration: none;
    font-size: clamp(0.85rem, 1.7vw, 0.9rem);
}

.cookie-settings-actions a:hover {
    text-decoration: underline;
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .cookie-banner-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .cookie-banner-actions {
        justify-content: flex-start;
    }
    
    .cookie-categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* Mobile landscape & portrait (481px - 767px) */
@media (max-width: 767px) {
    #cookie-consent-banner {
        max-height: 85vh;
    }
    
    .cookie-banner-content {
        padding: 1.25rem;
    }
    
    .cookie-banner-actions {
        width: 100%;
    }
    
    .cookie-banner-actions button {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .cookie-settings-panel {
        padding: 1.25rem;
    }
    
    .cookie-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-settings-actions button {
        width: 100%;
    }
}

/* Small mobile (320px - 480px) */
@media (max-width: 480px) {
    #cookie-consent-banner {
        max-height: 80vh;
    }
    
    .cookie-banner-content {
        padding: 1rem;
        gap: 1rem;
    }
    
    .cookie-banner-text h3 {
        font-size: 1rem;
    }
    
    .cookie-banner-text p {
        font-size: 0.85rem;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-banner-actions button {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .cookie-settings-panel {
        padding: 1rem;
    }
    
    .cookie-category {
        padding: 0.85rem;
    }
    
    .cookie-category label {
        font-size: 0.9rem;
    }
    
    .cookie-category p {
        font-size: 0.8rem;
    }
}

/* Large desktop (1920px+) */
@media (min-width: 1920px) {
    .cookie-banner-content {
        padding: 2rem;
    }
    
    .cookie-settings-panel {
        padding: 2rem;
    }
    
    .cookie-categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 1.5rem;
    }
}

/* Accessibility - Focus states */
.cookie-banner-actions button:focus,
.cookie-settings-actions button:focus,
.cookie-category input[type="checkbox"]:focus {
    outline: 3px solid #1755C9;
    outline-offset: 2px;
}

/* Print - ascunde banner-ul */
@media print {
    #cookie-consent-banner {
        display: none !important;
    }
}

/* ===== Banner cookies: butoane egale + comutatoare ===== */
#cookie-consent-banner .cc-btn {
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.5rem);
    border: 2px solid #1755C9;
    background: #1755C9;
    color: #ffffff;
    border-radius: 4px;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

#cookie-consent-banner .cc-btn:hover,
#cookie-consent-banner .cc-btn:focus-visible {
    background: #0F3F9C;
    border-color: #0F3F9C;
}

#cookie-consent-banner .cc-switch-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
}

#cookie-consent-banner .cc-switch {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#cookie-consent-banner .cc-switch-ui {
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    background: #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: background 0.2s;
    margin-top: 2px;
}

#cookie-consent-banner .cc-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
}

#cookie-consent-banner .cc-switch:checked + .cc-switch-ui {
    background: #1755C9;
}

#cookie-consent-banner .cc-switch:checked + .cc-switch-ui::after {
    transform: translateX(18px);
}

#cookie-consent-banner .cc-switch:disabled + .cc-switch-ui {
    opacity: 0.6;
    cursor: not-allowed;
}

#cookie-consent-banner .cc-switch:focus-visible + .cc-switch-ui {
    outline: 2px solid #0F3F9C;
    outline-offset: 2px;
}

#cookie-consent-banner .cc-always {
    color: #6B6B6B;
    font-weight: 400;
    font-size: 0.85rem;
}

/* R12: compact pe telefon */
@media (max-width: 640px) {
    #cookie-consent-banner { max-height: 46vh; }
    .cookie-banner-content { padding: 0.75rem 1rem; gap: 0.75rem; }
    .cookie-banner-text h3 { font-size: 1rem; margin-bottom: 0.25rem; }
    .cookie-banner-text p { font-size: 0.85rem; line-height: 1.4; }
}
