/* ============================================================
   SC.Portal — 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: var(--brand-primary-400);
    border-radius: 0 2px 2px 0;
}

/* -- FontAwesome integration with Tailwind sizing -- */
[class*="fa-"] {
    line-height: 1;
}

/* -- Hero banner: prevent text auto-selection on Blazor navigation -- */
[data-tour="hero-banner"],
.hero-banner {
    -webkit-user-select: none;
    user-select: none;
}

/* -- Focus ring for accessibility -- */
.focus-ring:focus {
    outline: 2px solid var(--brand-primary-500);
    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(var(--brand-accent-rgb), 0.4); }
    50%      { box-shadow: 0 0 30px rgba(var(--brand-accent-rgb), 0.6), 0 0 60px rgba(var(--brand-accent-rgb), 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;
}

/* -- Brand Utility Classes (driven by CSS custom properties) ----
   Use these instead of hardcoded hex values in Razor components.
   The CSS variables are emitted by IBrandingService in App.razor. -- */
.text-accent { color: var(--brand-accent); }
.text-accent-light { color: var(--brand-accent-light); }
.hover\:text-accent:hover { color: var(--brand-accent); }
.hover\:text-accent-light:hover { color: var(--brand-accent-light); }
.bg-accent { background-color: var(--brand-accent); }
.hover\:bg-accent:hover { background-color: var(--brand-accent); }
.bg-accent-light { background-color: var(--brand-accent-light); }
.bg-accent-bg { background-color: var(--brand-accent-bg); }
.border-accent { border-color: var(--brand-accent); }
.border-accent-light { border-color: var(--brand-accent-light); }
.ring-accent { --tw-ring-color: var(--brand-accent); }
.focus\:ring-accent:focus { --tw-ring-color: var(--brand-accent); }
.decoration-accent { text-decoration-color: var(--brand-accent); }
