/* Cookie Policy Modal Styles */

/* Ensure modal is properly layered above other elements */
#cookie-policy-modal {
    z-index: 1100;
}

/* Modal backdrop */
#cookie-policy-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Modal container animation */
#cookie-policy-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Dark mode modal container */
.dark #cookie-policy-modal .dark\:bg-gray-900 {
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Animation keyframes */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close button hover effects */
#close-cookie-modal {
    transition: all 0.2s ease-in-out;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#close-cookie-modal:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.dark #close-cookie-modal:hover {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Modal content scrollbar styling */
#cookie-policy-modal .overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

#cookie-policy-modal .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#cookie-policy-modal .overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

#cookie-policy-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

#cookie-policy-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.7);
}

/* Dark mode scrollbar */
.dark #cookie-policy-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: rgba(75, 85, 99, 0.5);
}

.dark #cookie-policy-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background-color: rgba(75, 85, 99, 0.7);
}

/* Table styling within modal */
#cookie-policy-modal table {
    font-size: 14px;
}

#cookie-policy-modal th {
    font-weight: 600;
    background-color: rgba(243, 244, 246, 1);
}

.dark #cookie-policy-modal th {
    background-color: rgba(31, 41, 55, 1);
}

#cookie-policy-modal td,
#cookie-policy-modal th {
    padding: 12px 16px;
    vertical-align: top;
}

/* Contact info box styling */
#cookie-policy-modal .bg-gray-100 {
    border-left: 4px solid #3b82f6;
}

.dark #cookie-policy-modal .dark\:bg-gray-800 {
    border-left: 4px solid #60a5fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cookie-policy-modal .max-w-4xl {
        max-width: 95vw;
        margin: 1rem;
    }
    
    #cookie-policy-modal .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #cookie-policy-modal table {
        font-size: 12px;
    }
    
    #cookie-policy-modal td,
    #cookie-policy-modal th {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    #cookie-policy-modal .max-w-4xl {
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    #cookie-policy-modal .px-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    #cookie-policy-modal h2 {
        font-size: 1.25rem;
    }
    
    #cookie-policy-modal h3 {
        font-size: 1.125rem;
    }
    
    #cookie-policy-modal h4 {
        font-size: 1rem;
    }
}

/* Focus styles for accessibility */
#cookie-policy-modal a:focus,
#cookie-policy-modal button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dark #cookie-policy-modal a:focus,
.dark #cookie-policy-modal button:focus {
    outline-color: #60a5fa;
}

/* Modal entrance/exit animations */
#cookie-policy-modal.modal-enter {
    animation: modalEnter 0.3s ease-out forwards;
}

#cookie-policy-modal.modal-exit {
    animation: modalExit 0.2s ease-in forwards;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        visibility: hidden;
    }
    to {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Prevent background scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #cookie-policy-modal .bg-white {
        border: 2px solid #000;
    }
    
    .dark #cookie-policy-modal .dark\:bg-gray-900 {
        border: 2px solid #fff;
    }
    
    #cookie-policy-modal .border-gray-200 {
        border-color: #000;
    }
    
    .dark #cookie-policy-modal .dark\:border-gray-700 {
        border-color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #cookie-policy-modal .bg-white,
    .dark #cookie-policy-modal .dark\:bg-gray-900,
    #close-cookie-modal {
        animation: none;
        transition: none;
    }
}