/* assets/css/globals.css */
/* Global Utilities for Technical Minimalist SaaS */

/* 1. Custom Scrollbars (Sottili, in stile Mac/SaaS) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* slate-300 */
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* slate-400 */
}

/* 2. Rimuove le frecce/spinners dagli input di tipo numerico per pulizia visiva */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* 3. Previene la selezione del testo per elementi di UI statici (Labels, Sidebar) */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 4. Font Data Utility (Forza l'uso di Space Grotesk per i numeri anche in tag testuali generici) */
.font-data {
    font-family: 'Space Grotesk', monospace !important;
    font-variant-numeric: tabular-nums; /* Allinea perfettamente le cifre in verticale */
}

/* =======================================================================
   5. PRAGMATIC COMPONENTS (From Stitch Integration)
   Usa queste classi nel tuo JS per non impazzire con lunghe stringhe Tailwind 
   ======================================================================= */

/* The "Pragmatic Card" per incapsulare i form e i risultati */
.bacshelp-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0; /* slate-200 */
    border-radius: 0.75rem; /* xl */
    padding: 1.5rem;
    transition: box-shadow 0.2s ease-in-out;
}
.bacshelp-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

/* Results Hero Widget (Per il box dei risparmi finali) */
.kpi-hero {
    background: linear-gradient(135deg, #e0e7ff 0%, #f5f3ff 100%); /* primary-container */
    border: 1px solid #4f46e5; /* primary */
    border-radius: 1.5rem; /* 2xl */
    padding: 2rem;
}
.kpi-value {
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    font-size: 2.25rem;
    line-height: 2.5rem;
    color: #0f172a; /* slate-900 */
    letter-spacing: -0.05em;
}

/* Technical Input Fields (Per i vari input di numeri e testi nei JS) */
.input-technical {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #f1f5f9; /* slate-100 */
    border: 1px solid transparent;
    border-radius: 0.5rem; /* md */
    font-family: 'Space Grotesk', monospace;
    font-size: 0.875rem;
    transition: all 0.2s;
    outline: none;
}
.input-technical:focus {
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Label standard per gli input tecnici */
.input-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569; /* slate-600 */
    margin-bottom: 0.25rem;
    display: block;
}

/* Real-time Indicator (Pillola verde lampeggiante) */
.live-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: #ecfdf5; /* emerald-50 */
    color: #059669; /* emerald-600 */
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 9999px;
}
.live-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    margin-right: 0.375rem;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
/* Help Button Style (Come da screenshot) */
.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: #e0e7ff; /* indigo-100 */
    color: #4f46e5; /* indigo-600 */
    border-radius: 0.75rem; /* xl */
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.btn-help:hover {
    background-color: #c7d2fe; /* indigo-200 */
    border-color: #818cf8; /* indigo-400 */
    transform: translateY(-1px);
}
.btn-help span.material-symbols-outlined {
    font-size: 1.1rem;
    background: #ffffff;
    border-radius: 50%;
    padding: 2px;
}
