/* Custom Cookies Popup Styling */
.cookies-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Semi-transparent backdrop */
.cookies-popup-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: -1;
}

/* Cookies bar container */
#cookies-bar {
    position: relative;
    max-width: 500px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    text-align: center;
    animation: cookiesPopupSlideIn 0.4s ease-out;
    z-index: 1;
}

/* Popup animation */
@keyframes cookiesPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Title styling */
#cookies-bar .title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Content styling */
#cookies-bar .content {
    margin: 0 0 25px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #666;
}

/* Buttons container */
#cookies-bar .buttons {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* Button styling */
#cookies-bar .buttons .btn {
    margin: 0;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 160px;
    font-size: 14px;
}

/* Primary button (Accept All) */
#cookies-bar .buttons .btn-primary,
#cookies-bar .buttons .btn-accept-all {
    background-color: #007bff;
    color: white;
    border: 2px solid #007bff;
}

#cookies-bar .buttons .btn-primary:hover,
#cookies-bar .buttons .btn-accept-all:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Secondary button (Manage Cookies) */
#cookies-bar .buttons .btn-secondary,
#cookies-bar .buttons .btn-manage-cookies {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

#cookies-bar .buttons .btn-secondary:hover,
#cookies-bar .buttons .btn-manage-cookies:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* Disable button (Reject All) */
#cookies-bar .buttons .btn-disable-all {
    background-color: #6c757d;
    color: white;
    border: 2px solid #6c757d;
}

#cookies-bar .buttons .btn-disable-all:hover {
    background-color: #545b62;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    #sg-cookiesBar {
        padding: 15px;
    }
    
    #cookies-bar {
        padding: 25px 20px;
        max-width: 100%;
    }
    
    #cookies-bar .title {
        font-size: 20px;
    }
    
    #cookies-bar .content {
        font-size: 14px;
    }
    
    #cookies-bar .buttons .btn {
        min-width: 140px;
        padding: 10px 20px;
    }
}

/* Hide the original cookies bar when popup is active */
#cookies-bar.original-bar {
    display: none !important;
}

/* Ensure popup is always on top */
.cookies-popup-overlay {
    z-index: 99999 !important;
}

/* Hide popup completely when hidden */
.cookies-popup-overlay[style*="display: none"],
.cookies-popup-overlay[style*="visibility: hidden"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure backdrop is also hidden */
.cookies-popup-overlay[style*="display: none"]::before,
.cookies-popup-overlay[style*="visibility: hidden"]::before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
