/* Cookie Banner Styles */
:root {
    --cb-bg: #2d3748;
    --cb-text: #ffffff;
    --cb-btn-accept: #4299e1;
    /* Brand Blue */
    --cb-btn-refuse: #718096;
    /* Grey */
    --cb-btn-settings: transparent;
    --cb-border: #4a5568;
}

/* Buttons */
.btn-cookie {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-accept {
    background: var(--cb-btn-accept);
    color: white;
}

.btn-accept:hover {
    background: #3182ce;
}

.btn-refuse {
    background: var(--cb-btn-refuse);
    color: white;
}

.btn-refuse:hover {
    background: #4a5568;
}

.btn-settings {
    background: transparent;
    color: #a0aec0;
    border: 1px solid #4a5568;
}

.btn-settings:hover {
    color: white;
    border-color: white;
}

.cookie-close-x {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Modal Styles (Aligned with Builder Modals) */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cookie-modal {
    background: #2d3748;
    color: #e2e8f0;
    width: 45%;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid #4a5568;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@media screen and (max-width: 1020px) {
    .cookie-modal {
        width: 95% !important;
        padding: 20px !important;
    }

    /* Smaller text for secondary buttons on mobile as requested */
    .btn-cookie-large:not(.btn-cookie-accept-all) strong {
        font-size: 1rem !important;
    }

    .btn-cookie-large:not(.btn-cookie-accept-all) span {
        font-size: 0.75rem !important;
    }

    .btn-cookie.btn-settings {
        font-size: 0.8rem !important;
        padding: 10px !important;
    }
}

.cookie-modal h2 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #63b3ed;
    font-size: 1.5rem;
    text-align: center;
}

/* Close Cross Styling matching builder */
.cookie-close-cross {
    font-size: 2rem;
    color: #fc8181;
    cursor: pointer;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: color 0.2s;
}

.cookie-close-cross:hover {
    color: #feb2b2;
}

.cookie-modal-body {
    padding: 0;
    overflow-y: auto;
    text-align: center;
}

.cookie-modal-help-text {
    font-size: 1rem;
    color: #cbd5e0;
    margin-bottom: 20px;
    text-align: center;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-info strong {
    display: block;
    margin-bottom: 5px;
    color: white;
}

.cookie-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #a0aec0;
}

/* Switch Toggle */
.cookie-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a5568;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--cb-btn-accept);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.cookie-switch.disabled input:checked+.slider {
    background-color: #2b6cb0;
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding-top: 15px;
    border-top: 1px solid var(--cb-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Reusing Modal Button Styling concepts for actions */
.btn-cookie-large {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 15px 20px;
    background: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.btn-cookie-large:hover {
    background: #2b6cb0;
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-cookie-large strong {
    display: block;
    font-size: 1.2rem;
    color: white;
}

.btn-cookie-large span {
    font-size: 0.85rem;
    color: #a0aec0;
}

/* Natural Footer for Editor Panels */
.footer-normale {
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 1px solid #4a5568;
    background-color: transparent;
    color: #a0aec0;
    text-align: center;
}

.footer-normale a {
    color: #4299e1;
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-normale a:hover {
    color: #63b3ed;
    text-decoration: underline;
}

.footer-normale span {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #718096;
}

/* Specific styling for footer inside Editor Panel to ensure readability on dark background */
.editor-panel .footer-normale {
    color: #ffffff !important;
    opacity: 0.95;
    border-top: 1px solid #4a5568;
}

.editor-panel .footer-normale a {
    color: #63b3ed !important;
}

.editor-panel .footer-normale span {
    color: #e2e8f0 !important;
}