/* ============================================
   COOKIE CONSENT TOAST & MODAL STYLES
   GDPR-compliant cookie consent notification
   ============================================ */

/* Toast Container - Bottom Right Positioning */
.cookie-consent-toast {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9999;
    max-width: 420px;
    animation: slideInRight 0.4s ease-out;
}

/* Toast exits with slide-out animation */
.cookie-consent-toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Toast Content Card */
.cookie-consent-content {
    position: relative;
    padding: 24px;
    background: white;
    border: 1px solid var(--slate-200);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Toast Header */
.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-consent-header i {
    font-size: 24px;
    color: var(--slate-700);
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
}

/* Toast Text */
.cookie-consent-text {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--slate-800);
}

/* Toast Actions (Buttons) */
.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-consent-actions button {
    flex: 1 1 auto;
    min-width: 100px;
}

/* Close Button */
.cookie-consent-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--slate-400);
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s;
}

.cookie-consent-close:hover {
    color: var(--slate-700);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Modal Customization Styles */

/* Enhanced modal title contrast */
.modal-content .modal-header .modal-title {
    font-weight: 700;
    color: #000000 !important;
}

/* Font rendering improvements */
.modal-content {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ensure pure white background for maximum contrast */
.modal-content .modal-body {
    background-color: #ffffff;
    color: #000000;
}

.cookie-category {
    padding: 16px;
    background: #ffffff;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cookie-category-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex: 1;
}

.cookie-category-info i {
    font-size: 24px;
    color: var(--slate-700);
    margin-top: 2px;
}

/* Enhanced specificity and darker colors for better contrast */
.modal-content .cookie-category-info h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.01em;
}

.modal-content .cookie-category-info small {
    display: block;
    font-size: 12px;
    color: var(--slate-600);
    font-weight: 500;
}

.modal-content .cookie-category-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--slate-900);
    font-weight: 400;
}

/* Modal intro paragraph - enhanced contrast */
.modal-content .cookie-modal-intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--slate-900);
    font-weight: 500;
}

/* Toggle Switch Styling (Bootstrap Override) */
.cookie-category .form-check-input {
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.cookie-category .form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Design - Mobile */
@media (max-width: 576px) {
    .cookie-consent-toast {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        border-radius: 0;
        animation: slideInUp 0.4s ease-out;
    }

    .cookie-consent-toast.hiding {
        animation: slideOutDown 0.3s ease-in forwards;
    }

    .cookie-consent-content {
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-radius: 16px 16px 0 0;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-consent-actions button {
        width: 100%;
        min-width: auto;
    }

    /* Mobile animations */
    @keyframes slideInUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

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

    /* Modal adjustments for mobile */
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-category .form-check {
        align-self: flex-start;
    }
}

/* Tablet Breakpoint */
@media (min-width: 577px) and (max-width: 768px) {
    .cookie-consent-toast {
        max-width: 380px;
    }
}

/* Accessibility */
.cookie-consent-toast:focus-within {
    outline: 2px solid var(--cyan-500);
    outline-offset: 2px;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-content {
        background: var(--slate-800);
        border-color: var(--slate-700);
    }

    .cookie-consent-header h3,
    .cookie-category-info h6 {
        color: var(--slate-100);
    }

    .cookie-consent-text,
    .cookie-category-description {
        color: var(--slate-300);
    }

    .cookie-consent-header i,
    .cookie-category-info i {
        color: var(--slate-400);
    }

    .cookie-consent-close {
        color: var(--slate-500);
    }

    .cookie-consent-close:hover {
        color: var(--slate-300);
    }
}

/* Print styles - hide toast when printing */
@media print {
    .cookie-consent-toast {
        display: none !important;
    }
}
