#cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
    padding: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#cookie-consent-banner.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#cookie-consent-banner .cookie-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

#cookie-consent-banner .close-banner-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: #4b465c;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    z-index: 1;
}

#cookie-consent-banner .close-banner-btn:hover {
    background-color: #f8fafc;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#cookie-consent-banner h3 {
    margin: 0;
    color: #393344;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

#cookie-consent-banner p {
    margin: 0;
    color: #4B465C;
    font-size: 0.8125rem;
    line-height: 1.4;
}

#cookie-consent-banner .cookie-buttons {
    display: flex;
    gap: 8px;
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    border: none;
    flex: 1;
    max-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background-color: #7e59f8;
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background-color: #5f26db;
}

.cookie-btn-secondary {
    background-color: transparent;
    color: #4b465c;
    border: 2px solid #cbd5e0;
    box-sizing: border-box;
}

.cookie-btn-secondary:hover {
    background-color: #f8fafc;
}

#cookie-consent-banner .cookie-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.6875rem;
}

#cookie-consent-banner .cookie-footer a {
    color: #7e59f8;
    text-decoration: none;
}

#cookie-consent-banner .cookie-footer a:hover {
    text-decoration: underline;
}

/* Floating cookie button */
#cookie-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #7e59f8;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(126, 89, 248, 0.3);
    z-index: 9998;
    transition: all 0.3s ease-in-out;
    color: #ffffff;
    font-size: 24px;
}

#cookie-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(126, 89, 248, 0.4);
    background-color: #5f26db;
}

#cookie-floating-btn.hidden {
    display: none !important;
}

#cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookie-preferences-modal .modal-content {
    background-color: #ffffff;
    border-radius: 6px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#cookie-preferences-modal h3 {
    margin: 0 0 16px 0;
    color: #393344;
    font-size: 1.25rem;
    font-weight: 600;
}

#cookie-preferences-modal p {
    margin: 0 0 20px 0;
    color: #4B465C;
    font-size: 0.875rem;
    line-height: 1.5;
}

#cookie-preferences-modal .preference-item {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

#cookie-preferences-modal .preference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#cookie-preferences-modal .preference-header h4 {
    margin: 0;
    color: #393344;
    font-size: 1rem;
    font-weight: 600;
}

#cookie-preferences-modal .preference-description {
    color: #4B465C;
    font-size: 0.875rem;
    line-height: 1.5;
}

#cookie-preferences-modal .toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}

#cookie-preferences-modal .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#cookie-preferences-modal .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 24px;
}

#cookie-preferences-modal .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

#cookie-preferences-modal input:checked + .toggle-slider {
    background-color: #7e59f8;
}

#cookie-preferences-modal input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

#cookie-preferences-modal input:disabled + .toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

#cookie-preferences-modal .modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

#cookie-preferences-modal .modal-buttons .cookie-btn {
    flex: 1;
}

#cookie-preferences-modal .cookie-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.6875rem;
}

#cookie-preferences-modal .cookie-footer a {
    color: #7e59f8;
    text-decoration: none;
}

#cookie-preferences-modal .cookie-footer a:hover {
    text-decoration: underline;
}

/* Responsive - desktop/tablet: buttons in row, mobile: column */
@media (max-width: 768px) {
    #cookie-consent-banner {
        max-width: 360px;
    }

    #cookie-consent-banner .cookie-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    #cookie-consent-banner {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        border-radius: 6px 6px 0 0;
        margin: 0;
        padding: 16px;
    }

    #cookie-consent-banner .cookie-buttons {
        flex-direction: column;
    }

    #cookie-consent-banner .cookie-footer {
        flex-direction: column;
        gap: 6px;
    }

    #cookie-preferences-modal .modal-buttons {
        flex-direction: column;
    }
}
