/* Cookieman Self-Contained Modal Styles */
#cookieman-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1rem;
    overflow-y: auto;
}

#cookieman-modal.flex {
    display: flex !important;
}

#cookieman-modal .cookieman-dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    background-color: #ffffff !important;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: cookieman-dialog-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieman-dialog-in {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Custom Toggle Switch for Category Cards */
.cookieman-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.cookieman-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.cookieman-switch-track {
    width: 2.75rem;
    height: 1.5rem;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease-in-out;
    position: relative;
}

.cookieman-switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background-color: #ffffff;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}

.cookieman-switch input:checked + .cookieman-switch-track {
    background-color: #2563eb;
}

.cookieman-switch input:checked + .cookieman-switch-track::after {
    transform: translateX(1.25rem);
}

.cookieman-switch input:disabled + .cookieman-switch-track {
    opacity: 0.65;
    cursor: not-allowed;
}
