/* Custom styles matching premium light mode */
html {
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    max-width: 100%;
    line-height: 1.5;
    font-family:
        "Inter",
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    background-color: #f9fafb;
    color: #111827;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Active navigation layout link */
.nav-link.active {
    background-color: #f3f4f6;
    color: #111827;
}

/* Scoped transitions only (avoid universal * transitions — main-thread cost) */
a,
button,
.nav-link,
.checkbox-pill,
input,
select,
textarea {
    transition-property: background-color, border-color, color,
        box-shadow, opacity;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Checkbox custom pill toggle checkmarks */
.checkbox-pill input[type="checkbox"]:checked ~ .checkmark-box {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Sonner-style custom Toast notifications */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.25rem;
    background-color: #18191b;
    border: 1px solid #2c2d2f;
    color: #f2f2f2;
    border-radius: 12px;
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.15),
        0 8px 10px -6px rgba(0, 0, 0, 0.15);
    font-size: 0.8125rem;
    font-weight: 500;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 280px;
    max-width: 380px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
    from {
        transform: translateY(1rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .toast {
        bottom: auto;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: calc(100% - 2rem);
        max-width: 380px;
        min-width: 0;
        animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes slideDown {
        from {
            transform: translate(-50%, -1rem);
            opacity: 0;
        }
        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }
}

/* Respect reduced motion preferences (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.mask-edges {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 10px,
        black calc(100% - 10px),
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        black 10px,
        black calc(100% - 10px),
        transparent
    );
}
