/* Cookie Consent Popup Styles */
#cookie-consent {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 80%;
    max-width: 1000px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 2147483647; /* Maximum z-index to appear above chat windows */
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#cookie-consent.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.cookie-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.cookie-text a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-btn.accept {
    background: #4CAF50;
    color: white;
}

.cookie-btn.accept:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cookie-btn.decline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn.decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    #cookie-consent {
        padding: 15px;
        width: 90%;
        bottom: 20px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .cookie-text {
        min-width: auto;
    }
    
    .cookie-text h3 {
        font-size: 16px;
    }
    
    .cookie-text p {
        font-size: 13px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
        padding: 14px 20px;
    }
    
    .cookie-close {
        top: 10px;
        right: 15px;
    }
}

/* Alternative positioning for chat window conflicts */
#cookie-consent.top-position {
    bottom: auto;
    top: 30px;
    transform: translateX(-50%) translateY(-150%);
}

#cookie-consent.top-position.show {
    transform: translateX(-50%) translateY(0);
}

/* For very small screens or when chat is open, move to top */
@media (max-width: 480px) {
    #cookie-consent {
        bottom: auto;
        top: 20px;
        transform: translateX(-50%) translateY(-150%);
    }

    #cookie-consent.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Compact layout for small screens */
@media (max-width: 480px) {
    .cookie-content {
        gap: 15px;
    }

    .cookie-text h3 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .cookie-text p {
        font-size: 12px;
        line-height: 1.3;
    }

    .cookie-buttons {
        gap: 8px;
    }

    .cookie-btn {
        padding: 10px 16px;
        font-size: 12px;
        min-width: 100px;
    }
}

/* Alternative: Sticky buttons layout */
.cookie-buttons-sticky {
    position: sticky;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    margin: -20px -20px -20px -20px;
    padding: 15px 20px;
    border-radius: 0 0 15px 15px;
    margin-top: 15px;
}

/* Animation for fade in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cookie-consent.show .cookie-content {
    animation: fadeInUp 0.5s ease-out;
}

#cookie-consent.top-position.show .cookie-content {
    animation: fadeInDown 0.5s ease-out;
}