/* ============================================================
   Frame — Global Styles
   Minimal CSS that complements Tailwind CDN.
   ============================================================ */

/* -- Smooth transitions for all interactive elements -- */
*, *::before, *::after {
    transition-property: color, background-color, border-color, box-shadow, opacity;
    transition-timing-function: ease-in-out;
    transition-duration: 150ms;
}

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

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

/* -- Sidebar transition for mobile open/close -- */
.sidebar-transition {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.overlay-transition {
    transition: opacity 0.3s ease-in-out;
}

/* -- Active sidebar nav indicator -- */
.nav-active {
    position: relative;
}
.nav-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: #818cf8;
    border-radius: 0 2px 2px 0;
}

/* -- FontAwesome integration with Tailwind sizing -- */
[class*="fa-"] {
    line-height: 1;
}

/* -- Focus ring for accessibility -- */
.focus-ring:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* -- Loading spinner animation -- */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}

/* -- Chart.js canvas text color (ensures Chart.js reads a visible default) -- */
canvas {
    color: #374151 !important;
}

/* -- Guided Tour spotlight pulse -- */
@keyframes tour-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(13, 148, 136, 0.4); }
    50%      { box-shadow: 0 0 30px rgba(13, 148, 136, 0.6), 0 0 60px rgba(13, 148, 136, 0.15); }
}
.tour-spotlight-glow {
    animation: tour-pulse 2s ease-in-out infinite;
}

/* -- Blazor reconnection UI -- */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}
