/**
 * AtivoLabs Cookie Consent Banner
 * Version: 1.0
 * GDPR Compliant Cookie Consent Interface
 */

/* ===================================
   COOKIE BANNER
   =================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1b26 0%, #2d2e3f 100%);
    color: #ffffff;
    padding: 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.cookie-consent-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ===================================
   COOKIE ICON
   =================================== */

.cookie-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #9d3ef5 0%, #c49bff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: pulse 2s ease-in-out infinite;
}

.cookie-icon img {
    display: block;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(157, 62, 245, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(157, 62, 245, 0);
    }
}

/* ===================================
   COOKIE CONTENT
   =================================== */

.cookie-content {
    flex: 1;
}

.cookie-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.cookie-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.cookie-description a {
    color: #9d3ef5;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-description a:hover {
    color: #c49bff;
}

/* ===================================
   COOKIE ACTIONS
   =================================== */

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #9d3ef5 0%, #c49bff 100%);
    color: #ffffff;
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 62, 245, 0.4);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-text {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
}

.cookie-btn-text:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* ===================================
   COOKIE SETTINGS MODAL
   =================================== */

.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.cookie-settings-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-settings-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-settings-header {
    padding: 32px;
    background: linear-gradient(135deg, #9d3ef5 0%, #c49bff 100%);
    color: #ffffff;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.cookie-settings-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cookie-settings-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cookie-settings-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.cookie-settings-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.cookie-settings-body {
    padding: 32px;
}

/* ===================================
   COOKIE CATEGORIES
   =================================== */

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d2e3f;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-required {
    font-size: 11px;
    background: #e0e0e0;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.cookie-category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ===================================
   TOGGLE SWITCH
   =================================== */

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #9d3ef5 0%, #c49bff 100%);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   SETTINGS FOOTER
   =================================== */

.cookie-settings-footer {
    padding: 24px 32px;
    background: #f5f5f5;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .cookie-icon img {
        width: 26px;
        height: 26px;
    }

    .cookie-title {
        font-size: 16px;
    }

    .cookie-description {
        font-size: 13px;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-settings-content {
        border-radius: 12px;
        max-height: 95vh;
    }

    .cookie-settings-header,
    .cookie-settings-body {
        padding: 24px;
    }

    .cookie-settings-title {
        font-size: 20px;
        padding-right: 32px;
    }

    .cookie-settings-footer {
        padding: 16px 24px;
        flex-direction: column-reverse;
    }

    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

.cookie-btn:focus,
.cookie-toggle-slider:focus,
.cookie-settings-close:focus {
    outline: 2px solid #9d3ef5;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-settings-modal,
    .cookie-settings-content {
        animation: none;
    }

    .cookie-icon {
        animation: none;
    }

    .cookie-btn,
    .cookie-toggle-slider,
    .cookie-settings-close {
        transition: none;
    }
}
