/*!
 * Custom Cookie Consent CSS for ACTR.ro
 * Simple, robust, GDPR-compliant styling
 */

/* ========================================
   COOKIE BANNER
   ======================================== */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    opacity: 0;
    transform: translateY(100%);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

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

.cc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.cc-banner {
    position: relative;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    padding: 24px;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .cc-banner {
        padding: 32px;
        max-width: 1200px;
        margin: 0 auto 20px;
        border-radius: 8px 8px 0 0;
    }
}

.cc-content {
    margin-bottom: 20px;
}

.cc-title {
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #002d72;
    margin: 0 0 12px 0;
}

.cc-description {
    font-family: "Roboto", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 767px) {
    .cc-buttons {
        flex-direction: column;
    }
}

/* ========================================
   BUTTONS
   ======================================== */

.cc-btn {
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cc-btn:active {
    transform: translateY(0);
}

.cc-btn-primary {
    background: #c8102e;
    color: #ffffff;
}

.cc-btn-primary:hover {
    background: #a00d25;
}

.cc-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cc-btn-secondary:hover {
    background: #e0e0e0;
}

@media (max-width: 767px) {
    .cc-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   SETTINGS MODAL
   ======================================== */

#cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cookie-consent-modal.cc-show {
    opacity: 1;
}

.cc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.cc-modal {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.cc-modal-header h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #002d72;
    margin: 0;
}

.cc-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.cc-close:hover {
    background: #f0f0f0;
    color: #333;
}

.cc-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cc-modal-description {
    font-family: "Roboto", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin: 0 0 24px 0;
}

.cc-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.cc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.cc-category-header h3 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #002d72;
    margin: 0 0 8px 0;
}

.cc-category-header p {
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */

.cc-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.cc-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cc-slider {
    background-color: #c8102e;
}

input:checked + .cc-slider:before {
    transform: translateX(24px);
}

input:disabled + .cc-slider {
    background-color: #4caf50;
    cursor: not-allowed;
    opacity: 0.7;
}

input:disabled + .cc-slider:before {
    background-color: #fff;
}

.cc-switch:hover .cc-slider:not(input:disabled + .cc-slider) {
    opacity: 0.9;
}

/* ========================================
   MODAL FOOTER
   ======================================== */

.cc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .cc-modal-footer {
        flex-direction: column;
    }
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 767px) {
    .cc-banner {
        padding: 20px;
    }

    .cc-title {
        font-size: 1.25rem;
    }

    .cc-description {
        font-size: 0.9rem;
    }

    .cc-modal {
        width: 95%;
        max-height: 95vh;
    }

    .cc-modal-header {
        padding: 16px;
    }

    .cc-modal-header h2 {
        font-size: 1.25rem;
    }

    .cc-modal-body {
        padding: 16px;
    }

    .cc-category {
        padding: 12px;
    }

    .cc-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cc-switch {
        margin-top: 8px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.cc-btn:focus,
.cc-close:focus,
.cc-switch input:focus + .cc-slider {
    outline: 2px solid #c8102e;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    #cookie-consent-banner,
    #cookie-consent-modal,
    .cc-btn,
    .cc-slider,
    .cc-slider:before {
        transition: none;
        animation: none;
    }
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .cc-banner,
    .cc-modal {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .cc-title,
    .cc-modal-header h2,
    .cc-category-header h3 {
        color: #ffffff;
    }

    .cc-description,
    .cc-modal-description,
    .cc-category-header p {
        color: #b0b0b0;
    }

    .cc-category {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }

    .cc-btn-secondary {
        background: #3a3a3a;
        color: #e0e0e0;
    }

    .cc-btn-secondary:hover {
        background: #4a4a4a;
    }

    .cc-modal-header,
    .cc-modal-footer {
        border-color: #3a3a3a;
    }

    .cc-close:hover {
        background: #3a3a3a;
        color: #e0e0e0;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    #cookie-consent-banner,
    #cookie-consent-modal {
        display: none !important;
    }
}
