/* Cookie Consent Styles */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1470px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(169, 144, 119, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Alice', serif;
}

.cookie-banner.active {
    display: flex;
    animation: cookieSlideUp 0.6s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner__content {
    flex: 1;
    margin-right: 30px;
}

.cookie-banner__text {
    font-size: 15px;
    line-height: 1.6;
    color: #4a3e35;
    margin: 0;
}

.cookie-banner__text a {
    color: #a99077;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

#cookie-configure-btn {
    color: #4a3e35 !important;
    border-color: rgba(74, 62, 53, 0.6) !important;
}

#cookie-configure-btn:hover {
    background-color: rgba(74, 62, 53, 0.1) !important;
}

/* Callback Button override to move higher ONLY when banner is visible */
.cookie-banner-active .callbackkiller.cbk-phone,
.cookie-banner-active #envybox-cbk-button-container, 
.cookie-banner-active #envybox-cbk-button, 
.cookie-banner-active .envybox-cbk-button,
.cookie-banner-active .envy-cbk-button-wrapper,
.cookie-banner-active div[id^="envybox"] {
    transform: translateY(-80px) !important;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
}

.cookie-modal.active {
    display: flex;
}

.cookie-modal__content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    font-family: 'Alice', serif;
}

.cookie-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #a99077;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #efefef;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cookie-category__title {
    font-weight: bold;
    font-size: 18px;
    color: #1a1a1a;
}

.cookie-category__description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

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

.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: #ddd;
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .cookie-slider { background-color: #a99077; }
input:checked + .cookie-slider:before { transform: translateX(20px); }
input:disabled + .cookie-slider { background-color: #f5f5f5; cursor: not-allowed; }

@media (max-width: 1024px) {
    .cookie-banner {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        bottom: 0; left: 0; right: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 25px 20px;
    }
    .cookie-banner__content { margin-right: 0; margin-bottom: 20px; }
    .cookie-banner__actions { width: 100%; flex-direction: column; }
    .cookie-banner__actions .btn { width: 100%; }
    
    #envybox-cbk-button-container, .envybox-cbk-button {
        bottom: 180px !important;
    }

    .cookie-policy-modal__footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .cookie-policy-modal__footer .btn {
        width: 100%;
        margin: 0 !important;
    }

    #cookie-policy-to-settings {
        text-align: center;
        width: 100%;
        display: block;
    }
}

.cookie-policy-modal__content {
    max-width: 800px;
}

.cookie-policy-scrollable {
    max-height: 50vh;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 15px;
    font-family: inherit;
    line-height: 1.6;
}

.cookie-policy-scrollable h3, .cookie-policy-scrollable h4 {
    color: #a99077;
    margin-top: 25px;
}

.cookie-policy-scrollable p {
    margin-bottom: 15px;
}

.cookie-policy-modal__footer {
    display: flex;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #efefef;
}

.cookie-policy-modal__footer #cookie-policy-print {
    margin-right: 15px;
}

#cookie-policy-to-settings {
    color: #a99077;
    font-weight: 600;
    text-decoration: underline;
}

#cookie-policy-modal-close-btn {
    margin-left: auto;
}

/* Custom Scrollbar for Policy */
.cookie-policy-scrollable::-webkit-scrollbar {
    width: 6px;
}
.cookie-policy-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.cookie-policy-scrollable::-webkit-scrollbar-thumb {
    background: #a99077;
    border-radius: 10px;
}

@media print {
    /* Hide all page content except the modal */
    body > * {
        display: none !important;
    }
    
    #cookie-policy-modal {
        display: block !important;
        position: relative !important;
        background: white !important;
        backdrop-filter: none !important;
        z-index: 99999 !important;
    }

    /* Target the modal content specifically within the block */
    body > #cookie-policy-modal {
        display: block !important;
    }

    .cookie-policy-modal__content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .cookie-policy-scrollable {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    /* Hide UI elements in print */
    .cookie-modal__close,
    .cookie-policy-modal__footer,
    #cookie-banner,
    .callbackkiller {
        display: none !important;
    }

    /* Reset font for print */
    body {
        background: white !important;
    }
}
