/**
 * GDPR Consent Manager Styles
 * Pentru Expert Hidroizolații București
 */

/* ===== CONSENT BANNER ===== */
.consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 380px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    border-radius: 12px;
    border: 2px solid #f97316;
}

.consent-banner--visible {
    transform: translateX(0);
}

.consent-banner__container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.consent-banner__content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.consent-banner__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #f97316;
    margin-top: 0.125rem;
}

.consent-banner__text h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.consent-banner__text p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.consent-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== CONSENT BUTTONS ===== */
.consent-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 1;
}

.consent-btn--primary {
    background: #f97316;
    color: white;
}

.consent-btn--primary:hover {
    background: #ea580c;
    transform: translateY(-1px);
}

.consent-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.consent-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.consent-btn--settings {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.consent-btn--settings:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ===== CONSENT MODAL ===== */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.consent-modal--visible {
    opacity: 1;
    visibility: visible;
}

.consent-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.consent-modal__container {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.consent-modal--visible .consent-modal__container {
    transform: scale(1);
}

.consent-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.consent-modal__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.consent-modal__close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.consent-modal__close:hover {
    background: #e5e7eb;
    color: #374151;
}

.consent-modal__content {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.consent-modal__actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    justify-content: flex-end;
}

/* ===== CONSENT CATEGORIES ===== */
.consent-category {
    margin-bottom: 2rem;
}

.consent-category:last-child {
    margin-bottom: 0;
}

.consent-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.consent-category__header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.consent-category p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
}

/* ===== CONSENT TOGGLE ===== */
.consent-toggle {
    position: relative;
    display: inline-block;
}

.consent-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle label {
    display: block;
    width: 48px;
    height: 24px;
    background: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.consent-toggle label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.consent-toggle input[type="checkbox"]:checked + label {
    background: #2563eb;
}

.consent-toggle input[type="checkbox"]:checked + label::after {
    transform: translateX(24px);
}

.consent-toggle--disabled label {
    cursor: not-allowed;
    opacity: 0.6;
}

.consent-toggle--disabled input[type="checkbox"]:checked + label {
    background: #10b981;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .consent-banner {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 0.875rem;
    }
    
    .consent-banner__content {
        gap: 0.5rem;
    }
    
    .consent-banner__text h3 {
        font-size: 0.9rem;
    }
    
    .consent-banner__text p {
        font-size: 0.75rem;
    }
    
    .consent-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    
    .consent-modal__container {
        width: 95%;
        margin: 1rem;
    }
    
    .consent-modal__header,
    .consent-modal__content,
    .consent-modal__actions {
        padding: 1rem;
    }
    
    .consent-modal__actions {
        flex-direction: column;
    }
    
    .consent-category__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .consent-banner__actions {
        flex-direction: column;
    }
    
    .consent-btn {
        width: 100%;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .consent-banner,
    .consent-modal,
    .consent-modal__container,
    .consent-btn,
    .consent-toggle label,
    .consent-toggle label::after {
        transition: none;
    }
}

/* Focus states pentru accessibility */
.consent-btn:focus,
.consent-modal__close:focus,
.consent-toggle input[type="checkbox"]:focus + label {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .consent-banner,
    .consent-modal {
        display: none !important;
    }
}
