/**
 * FIX CONTRAST COOKIE BANNER - WCAG 2.1 AA Compliance
 *
 * Problemă identificată în PageSpeed Insights:
 * - Linkurile și butoanele din modulul cookie au contrast insuficient
 * - Standard WCAG 2.1 AA necesită raport minim 4.5:1 pentru text normal
 * - Standard WCAG 2.1 AA necesită raport minim 3:1 pentru text mare (18px+)
 */

/* ===== LINKURI DIN BANNER ===== */
.cookie-consent-modal .cookie-links a {
    color: #0056b3 !important;  /* Albastru închis - contrast 7.0:1 pe fundal alb */
    font-weight: 600;
    text-decoration: underline;
}

.cookie-consent-modal .cookie-links a:hover {
    color: #003d82 !important;  /* Albastru și mai închis la hover - contrast 9.5:1 */
    text-decoration: underline;
}

/* ===== BUTOANE COOKIE ===== */
/* Butonul "Acceptă Toate" - Verde închis pentru contrast */
#cookie-accept-btn,
#cookie-accept-all-btn {
    background: linear-gradient(to left, #28a745, #1e7e34, #28a745) !important;
    background-size: 200% !important;
    background-position: right !important;
    color: #ffffff !important;  /* Alb pe verde închis - contrast 4.6:1 */
    font-weight: 700 !important;
    border: 2px solid #1e7e34 !important;
}

#cookie-accept-btn:hover,
#cookie-accept-all-btn:hover {
    background-position: left !important;
    color: #ffffff !important;
    border-color: #155724 !important;
}

/* Butonul "Respinge Opționalele" - Gri închis pentru contrast */
#cookie-reject-btn,
#cookie-reject-all-btn {
    background: #6c757d !important;  /* Gri închis - contrast 4.5:1 cu alb */
    color: #ffffff !important;
    font-weight: 700 !important;
    border: 2px solid #5a6268 !important;
}

#cookie-reject-btn:hover,
#cookie-reject-all-btn:hover {
    background: #5a6268 !important;  /* Gri și mai închis */
    color: #ffffff !important;
    border-color: #4e555b !important;
}

/* Butonul "Personalizează" / "Setări" - Portocaliu optimizat */
#cookie-settings-btn {
    background: linear-gradient(to left, #e67e22, #d35400, #e67e22) !important;
    background-size: 200% !important;
    background-position: right !important;
    color: #ffffff !important;  /* Alb pe portocaliu închis - contrast 4.7:1 */
    font-weight: 700 !important;
    border: 2px solid #d35400 !important;
}

#cookie-settings-btn:hover {
    background-position: left !important;
    color: #ffffff !important;
    border-color: #af4500 !important;
}

/* Butonul "Salvează preferințe" din modal */
#cookie-save-btn {
    background: linear-gradient(to left, #007bff, #0056b3, #007bff) !important;
    background-size: 200% !important;
    background-position: right !important;
    color: #ffffff !important;  /* Alb pe albastru - contrast 4.5:1 */
    font-weight: 700 !important;
    border: 2px solid #0056b3 !important;
}

#cookie-save-btn:hover {
    background-position: left !important;
    color: #ffffff !important;
    border-color: #003d82 !important;
}

/* ===== TEXT ÎN MODAL ===== */
.cookie-consent-modal h4 {
    color: #212529 !important;  /* Negru aproape pur - contrast maxim */
    font-weight: 700 !important;
}

.cookie-consent-modal p {
    color: #343a40 !important;  /* Gri foarte închis - contrast 11.2:1 */
    font-size: 14px;
}

.cookie-consent-modal strong {
    color: #212529 !important;  /* Text bold și mai vizibil */
    font-weight: 800 !important;
}

/* ===== MODAL PREFERENCES (Bootstrap) ===== */
#cookiePrefsModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

#cookiePrefsModal .modal-title {
    color: #212529 !important;  /* Negru pentru titlu */
    font-weight: 700 !important;
}

#cookiePrefsModal label {
    color: #343a40 !important;  /* Gri închis pentru label-uri */
    font-weight: 600 !important;
}

#cookiePrefsModal .form-check-label {
    color: #495057 !important;  /* Text checkbox labels */
}

/* ===== LINK "Open Cookie Settings" DIN FOOTER ===== */
#open-cookie-settings {
    color: #ffffff !important;  /* Alb pe fundal întunecat footer */
    text-decoration: underline;
    font-weight: 600;
}

#open-cookie-settings:hover {
    color: #ffc107 !important;  /* Galben la hover pentru vizibilitate */
    text-decoration: underline;
}

/* ===== RESPONSIVE - Asigură vizibilitate pe mobile ===== */
@media (max-width: 575px) {
    .cookie-consent-modal .cookie-buttons .btn {
        font-size: 14px !important;
        padding: 12px 24px !important;
        min-height: 44px !important;  /* Touch target minim WCAG */
    }

    .cookie-consent-modal .cookie-links a {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
}

/* ===== FOCUS STATES pentru accesibilitate keyboard ===== */
.cookie-buttons .btn:focus,
.cookie-links a:focus,
#open-cookie-settings:focus {
    outline: 3px solid #0056b3 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.25) !important;
}

/* Prevent outline pe click dar păstrează pentru keyboard */
.cookie-buttons .btn:focus:not(:focus-visible),
.cookie-links a:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
