/* Cookie Consent Banner Styling */
#onlionit-cookie-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    background: rgba(255, 255, 255, 0.98);
    color: #2d3748;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.cookie-banner-container {
    padding: 24px;
}

.cookie-banner-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
    color: #1a202c;
}

.cookie-banner-text {
    margin-bottom: 20px;
    color: #4a5568;
}

.cookie-banner-text a {
    color: #58799c;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #476380;
}

/* Preferences Toggle Section */
.cookie-banner-prefs {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-top: 0px solid #e2e8f0;
    margin-bottom: 0;
}

.cookie-banner-prefs.open {
    max-height: 400px;
    overflow-y: auto;
    border-top-width: 1px;
    margin-top: 16px;
    margin-bottom: 20px;
    padding-top: 16px;
}

.cookie-pref-item {
    margin-bottom: 16px;
}

.cookie-pref-item:last-child {
    margin-bottom: 0;
}

.cookie-pref-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1a202c;
}

.cookie-pref-desc {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    margin-bottom: 0;
}

.cookie-pref-desc a {
    color: #58799c;
    text-decoration: underline;
}

/* CSS Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .3s;
    border-radius: 22px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #58799c;
}

.cookie-switch input:disabled + .cookie-slider {
    background-color: #a0aec0;
    cursor: not-allowed;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(16px);
}

/* Actions Section */
.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.cookie-btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    flex: 1 1 calc(50% - 5px);
    text-align: center;
}

.cookie-btn-primary {
    background-color: #58799c;
    color: #ffffff;
}

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

.cookie-btn-secondary {
    background-color: #edf2f7;
    color: #4a5568;
}

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

.cookie-btn-link {
    background: transparent;
    color: #58799c;
    padding: 8px 0;
    flex: 1 1 100%;
    text-decoration: underline;
    font-size: 13px;
}

.cookie-btn-link:hover {
    color: #476380;
}

/* Floating widget to reopen settings */
#onlionit-cookie-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #58799c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999998;
    transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

#onlionit-cookie-trigger:hover {
    transform: scale(1.08);
    background-color: #58799c;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    #onlionit-cookie-banner {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    
    #onlionit-cookie-trigger {
        bottom: 16px;
        left: 16px;
        width: 38px;
        height: 38px;
    }
    
    .cookie-banner-container {
        padding: 20px 16px;
    }
    
    .cookie-btn {
        flex: 1 1 100%;
    }
}
