/**
 * Shared styles for B1 italian fiscal calculators (CF generator, IVA
 * professionisti, TFR, F24, regime forfettario, IBAN lookup).
 *
 * Generic patterns (input/select/tabs/panel/result/actions/grid/field/
 * table/hero-card/breakdown) live in the design system (public.css).
 * This file only carries cluster-specific helpers: vertical section
 * wrapper, monospace numeric table cell, autocomplete dropdown,
 * `fc-msg` flat alert (single-line callout without icon, used in
 * inline result feedback - to be migrated to tools-alert in a later
 * refactor pass).
 */

/* Vertical section wrapper. */
.fc-section { display: flex; flex-direction: column; gap: 1rem; }

/* Monospace numeric cell helper for tables (TFR yearly grid, F24
 * rate plan, CF homocode list). */
.fc-num {
    font-family: var(--font-mono, ui-monospace, monospace);
    text-align: right;
    white-space: nowrap;
}

/* ===== Flat single-line alert (no icon) =====
 * Lightweight inline feedback inside results panels. Variants follow
 * the .is-* convention (kept stable for now; richer .tools-alert--*
 * with icon will replace these in the per-tool refactor of section 4). */

.fc-msg {
    padding: 0.7rem 0.9rem;
    border-radius: var(--r-md, 10px);
    margin-top: 0.6rem;
    font-size: 0.88rem;
}

.fc-msg.is-error {
    background: #fef2f2;
    border-left: 3px solid #b91c1c;
    color: #7f1d1d;
}

.fc-msg.is-warn {
    background: #fefce8;
    border-left: 3px solid #ca8a04;
    color: #854d0e;
}

.fc-msg.is-ok {
    background: #f0fdf4;
    border-left: 3px solid #15803d;
    color: #166534;
}

.fc-msg.is-info {
    background: #eff6ff;
    border-left: 3px solid #2563eb;
    color: #1e3a8a;
}

/* ===== Autocomplete dropdown (CF generator: comune lookup) ===== */

.fc-autocomplete {
    position: relative;
}

.fc-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-bg-card, #fff);
    border: 1px solid var(--c-line, #e2e8f0);
    border-radius: var(--r-md, 10px);
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: var(--shadow-md, 0 4px 8px rgba(0,0,0,0.08));
}

.fc-autocomplete-item {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--c-line, #e2e8f0);
}

.fc-autocomplete-item:last-child { border-bottom: none; }
.fc-autocomplete-item:hover,
.fc-autocomplete-item.is-active {
    background: var(--c-bg, #f8fafc);
    color: var(--c-blue, #0065c0);
}

.fc-autocomplete-item code {
    font-family: var(--font-mono, ui-monospace, monospace);
    color: var(--c-ink-mute, #64748b);
    font-size: 0.85em;
    margin-left: 0.5rem;
}

/* ===== Print stylesheet (cluster-specific overrides) =====
 * Generic print rules in public.css section 32. */
@media print {
    .fc-actions { display: none !important; }
    .fc-msg { page-break-inside: avoid; }
}
