@font-face {
    font-family: "Nunito Sans";
    src: url("/assets/fonts/NunitoSans-VariableFont_YTLC,opsz,wdth,wght.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("/assets/fonts/NunitoSans-Italic-VariableFont_YTLC,opsz,wdth,wght.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

:root {
    --bs-font-sans-serif: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.spinner-indicator {
    opacity: 0;
    transition: opacity 500ms ease-in;
    width: 1px;
    height: 1px;
    position: absolute;
}

.htmx-request .spinner-indicator {
    opacity: 1;
    width: 1rem;
    height: 1rem;
    position: relative;
    margin-left: 0.5rem;
}

.htmx-request.spinner-indicator {
    opacity: 1;
    width: 1rem;
    height: 1rem;
    position: relative;
    margin-left: 0.5rem;
}

/* Utility overrides and custom styles */
body[data-bs-theme="dark"] .text-bg-dark {
    background-color: #212529 !important;
}

.btn {
    border-radius: 3em;
}

.nav-link {
    border-radius: 3em !important;
}

.input-group > :first-child {
    border-radius: 3em;
}

.input-group > :last-child {
    border-radius: 3em;
}

/* Base placeholder */
.content-loader {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0; /* light gray base */
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem; /* match your dashboard cards */
}

/* Shimmer effect */
.content-loader::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%; /* start off to the left */
    width: 150%;
    height: 100%;
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
}

/* Move the gradient across */
@keyframes shimmer {
    0% {
        left: -150%;
    }
    100% {
        left: 100%;
    }
}

[data-bs-theme="dark"] .content-loader {
    background-color: #2a2a2a; /* dark gray base */
}

[data-bs-theme="dark"] .content-loader::after {
    /* lighter-but-still-muted gradient for dark */
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(152, 152, 152, 0.15) 50%,
            rgba(255, 255, 255, 0) 100%
    );
}

tr.highlight-hardware td {
    background-color: rgba(0, 151, 16, 0.25) !important;
}

tr.selected-hardware td {
    background-color: rgba(13, 110, 253, 0.25) !important;
}

tr.warning-hardware td {
    background-color: rgba(253, 233, 13, 0.1);
}

tr.key-used {
    /*  background-color: rgba(64, 64, 64, 0.1); */
}

tr.key-error td {
    background-color: rgba(253, 13, 13, 0.1);
}

tr.key-locked td {
    background-color: rgba(13, 110, 253, 0.1);
}

tr.key-active td {
    background-color: rgba(0, 151, 16, 0.1);
}

:root {
    --bs-table-hover-bg: rgba(173, 216, 230, 0.2) !important;
}

.dashboard-grid {
    width: 100%;
}


.dashboard-item > * {
    margin: 0.5rem;
}

.dashboard-item {
    position: relative;
}

.dashboard-item {
    width: 100%;
}

@media (min-width: 768px) {
    .dashboard-item {
        width: 50%;
    }

    .dashboard-item--width2 {
        width: 100%;
    }

    .dashboard-item--width3 {
        width: 100%;
    }

    .dashboard-item--width4 {
        width: 100%;
    }

    .dashboard-item--width5 {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .dashboard-item {
        width: 20%;
    }

    .dashboard-item--width2 {
        width: 40%;
    }

    .dashboard-item--width3 {
        width: 60%;
    }

    .dashboard-item--width4 {
        width: 80%;
    }

    .dashboard-item--width5 {
        width: 100%;
    }
}
/*
@media (min-width: 2000px) {
    .dashboard-item {
        width: 10%;
    }

    .dashboard-item--width2 {
        width: 20%;
    }

    .dashboard-item--width3 {
        width: 40%;
    }

    .dashboard-item--width4 {
        width: 80%;
    }

    .dashboard-item--width5 {
        width: 100%;
    }
}
*/
.dashboard-item--height2 {
    min-height: 300px;
}

.dashboard-item--height3 {
    min-height: 450px;
}

.dashboard-item--height4 {
    min-height: 600px;
}

.dashboard-item.is-dragging,
    /* Packery adds class while transitioning to drop position */
.dashboard-item.is-positioning-post-drag {
    background: rgba(234, 170, 0, 0.2);
    z-index: 2; /* keep dragged item on top */
}

.widget-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
}

.remove-widget {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}