/* HTMX indicators */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline-block;
}
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Smooth transitions for HTMX swaps */
.htmx-settling {
    opacity: 1;
}
.htmx-swapping {
    opacity: 0.5;
    transition: opacity 0.15s ease-out;
}
.htmx-added {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}
.htmx-added.htmx-settling {
    opacity: 1;
}

/* Pulse animation for active dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.animate-pulse {
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Toast animations */
@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
.toast-enter {
    animation: toast-in 0.3s ease-out;
}
.toast-exit {
    animation: toast-out 0.3s ease-in forwards;
}

/* Fade-in animation for page load */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fade-in 0.3s ease-out;
}

/* Slide-in for drawers */
@keyframes slide-in-right {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Skeleton loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Select styling for dark mode */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Focus ring override for dark mode */
*:focus {
    outline: none;
}

/* Checkbox styling */
input[type="checkbox"] {
    cursor: pointer;
}

/* Table row hover transitions */
tbody tr {
    transition: background-color 0.15s ease;
}

/* Card hover effect */
.hover-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hover-card:hover {
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Disabled button styles */
button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Responsive sidebar (hidden on mobile) */
@media (max-width: 768px) {
    aside {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    aside.open {
        transform: translateX(0);
    }
    .ml-60 {
        margin-left: 0 !important;
    }
}
