/* ═══════════════════════════════════════════
   SPUNTO PENSIONE — CSS VISUAL
   ═══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   VISTA 2 — CATEGORY (Griglia Card)
   ══════════════════════════════════════════ */
.view--category {
    padding: calc(var(--header-h) + 10px) 30px calc(var(--footer-h) + 180px);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.btn-back {
    position: fixed;
    top: 22px;
    left: 20px;
    z-index: 101;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--antracite, #2A2C31);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--bianco, #fff);
    font-family: inherit;
    padding: 8px 16px;
    border-radius: 0;
    transition: all .2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.btn-back:hover {
    background: var(--current-accent, rgba(0, 0, 0, .8));
    color: var(--bianco, #fff);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Legacy .category-title kept for compatibility with Level C topbars */
.category-title {
    flex: 1;
    text-align: center;
    padding-right: 80px;
}

/* Level C topbar — transparent, blending with section background */
.category-topbar {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: transparent;
    border-bottom: none;
    flex-shrink: 0;
}

.coverflow-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 900px;
    overflow: hidden;
    padding: 20px 0;
}

.coverflow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 260px;
}

.coverflow__card {
    position: absolute;
    width: 180px;
    height: 230px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    transition: transform .45s var(--ease-out), opacity .45s var(--ease-out), box-shadow .35s var(--ease-out);
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform, opacity;
}

.coverflow__card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.coverflow__label {
    pointer-events: none;
}

.coverflow-desc {
    text-align: center;
    font-size: 1rem;
    color: #555;
    padding: 10px 24px 24px;
    min-height: 48px;
    flex-shrink: 0;
    transition: opacity .3s;
}

@media (max-width: 700px) {
    .coverflow__card {
        width: 140px;
        height: 190px;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1rem;
        padding-right: 50px;
    }
}

/* ══════════════════════════════════════════
   VISTA 3 — CEDOLINO INTERATTIVO
   ══════════════════════════════════════════ */
.view--cedolino {
    padding: calc(var(--header-h) + 10px) 30px calc(var(--footer-h) + 20px);
    align-items: center;
    overflow-y: auto;
}

.view--cedolino .page-title,
.view--assegno-sociale .page-title {
    margin-bottom: 30px;
}

.view--cedolino .page-title {
    text-align: left;
}

.cedolino-intro-area {
    padding: 20px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.cedolino-intro-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--uil-text-dark);
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--current-accent);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(var(--current-accent-rgb, 255, 255, 255), 0.2);
}

/* ══════════════════════════════════════════
   GLOBAL ACTION AREA (1 Large + 2 Side)
   Standardized layout for Level C views
   ══════════════════════════════════════════ */
.action-area-standard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 30px 20px 40px;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.action-area-standard .side-actions {
    display: flex;
    flex-direction: row;
    /* Force side-by-side on desktop */
    gap: 12px;
}

.action-area-standard .side-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    color: var(--uil-text-dark);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px 15px;
    width: 200px;
    height: 84px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.3;
}

.action-area-standard .side-btn:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--current-accent);
}

.action-area-standard .main-action {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.action-area-standard .btn-chat-pdf,
.action-area-standard .action-tile-standard {
    width: 100%;
    min-height: 94px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: var(--current-accent);
    color: white;
    border: none;
    border-radius: 50px;
    /* Modern pill for large action */
    padding: 20px 30px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.action-area-standard .btn-chat-pdf:hover,
.action-area-standard .action-tile-standard:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.action-area-standard .icon-large {
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}


.btn-mail {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--uil-blue);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 61, 153, 0.3);
    transition: transform .2s var(--ease-out), background .2s;
}

.btn-mail:hover {
    background: var(--uil-blue-dark);
    transform: translateY(-2px);
}

.btn-mail .icon {
    font-size: 1.5rem;
}

.cedolino-scroll-container {
    overflow-y: auto;
    overflow-x: auto;
    padding: 10px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    width: 100%;
}

/* ZOOM WRAPPER COMMUNE */
.document-zoom-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.floating-zoom-controls {
    position: absolute;
    top: -15px;
    right: 5px;
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(30, 30, 36, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-zoom-controls .btn-zoom {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    color: var(--uil-text-dark);
    transition: transform 0.1s ease, color 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-zoom-controls .btn-zoom:hover {
    transform: scale(1.15);
    color: var(--current-accent);
}

.cedolino-facsimile {
    background: white;
    width: 100%;
    max-width: 650px;
    min-width: 320px;
    padding: 20px 20px 40px;
    border: 1px solid #ccc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', Courier, monospace;
    color: #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.cedolino-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
}

.inps-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--current-accent);
    border: 3px solid var(--current-accent);
    padding: 0 10px;
}

.cedolino-meta {
    text-align: right;
}

.cedolino-meta h2 {
    font-size: 1.8rem;
    margin: 0;
    text-transform: uppercase;
    color: #000;
}

.cedolino-section {
    margin-bottom: 25px;
    border: 1px solid #000;
}

.cedolino-section h3 {
    background: #eee;
    margin: 0;
    padding: 5px 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid #000;
    text-transform: uppercase;
}

.grid-row {
    display: flex;
}

.grid-col {
    flex: 1;
    padding: 10px;
    border-right: 1px solid #000;
}

.grid-col:last-child {
    border-right: none;
}

.grid-col label {
    display: block;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.grid-col .value {
    font-size: 1.1rem;
}

.grid-table .table-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

.grid-table .table-row:last-child {
    border-bottom: none;
}

.grid-table .table-header {
    font-weight: bold;
    border-bottom: 1px solid #000;
    font-size: 0.85rem;
}

.text-right {
    text-align: right;
}

.section-netto {
    margin-top: auto;
    border: 2px solid #000;
    background: #f9f9f9;
}

.netto-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.netto-row .label {
    font-weight: 900;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.netto-row .value {
    font-weight: 900;
    font-size: 1.8rem;
    color: #000;
}

.hotspot {
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.hotspot:hover {
    background: rgba(255, 223, 0, 0.4) !important;
}

.hotspot::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--uil-yellow);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.hotspot:hover::after {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 200, 66, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(245, 200, 66, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 200, 66, 0);
    }
}

/* ══════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--antracite);
    color: var(--uil-text-dark);
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    position: relative;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalIn 0.3s var(--ease-out);
}

.modal-content--large {
    max-width: 800px;
    background: var(--antracite);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 60px;
    height: 60px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--uil-text-dark);
    border-radius: 50%;
    font-size: 32px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-text-large {
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--uil-text-dark);
    font-weight: 600;
    text-align: center;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--current-accent);
    border-bottom: 3px solid var(--current-accent);
    padding-bottom: 10px;
}

.modal-explanation {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-source-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-source {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 10px;
}

.modal-source {
    font-style: italic;
    font-size: 1rem;
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-left: 4px solid var(--current-accent);
}

.hidden {
    display: none !important;
}

/* ═════════════════════════════════════════════════════════════
   HEADER SEARCH RESULTS
   ═════════════════════════════════════════════════════════════ */
.header-search-input {
    width: 100%;
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    background: #ffffff;
    color: #333333;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-results-container {
    position: absolute;
    bottom: auto;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 2px solid var(--uil-blue);
    border-radius: 0;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f0f7ff;
    color: var(--uil-blue);
}

/* ═════════════════════════════════════════════════════════════
   PDF GENERATOR (APPUNTAMENTI)
   Stile "Metro" minimale B/N per ottimizzazione stampa A4
   ═════════════════════════════════════════════════════════════ */
.pdf-content {
    font-family: 'Montserrat', 'Inter', sans-serif;
    color: #000000;
    background-color: #FFFFFF;
    padding: 40px;
}

.pdf-title {
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.pdf-fields {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
}

.pdf-subtitle {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
}

.pdf-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.pdf-list li {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #CCCCCC;
    line-height: 1.4;
}

/* ══════════════════════════════════════════
   VISTA 4 — ASSEGNO SOCIALE (Wizard)
   ══════════════════════════════════════════ */

.intro-fixed-wrapper {
    padding: 20px 24px 10px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.stepper-viewport {
    flex: 1;
    overflow: hidden;
    overflow-y: auto;
    position: relative;
    padding-bottom: 100px;
}

.stepper-track {
    position: relative;
    width: 100%;
    display: block;
}

.step-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    /* Removed horizontal padding so it doesn't squeeze the container */
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 2;
}

.step-slide.past {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-40px);
    z-index: 1;
}

/* Removed .view-scroll-container as we use flex now */

.wizard-block {
    background: var(--antracite);
    color: var(--uil-text-dark);
    width: 100%;
    max-width: 820px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px 30px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.block-intro {
    background: transparent;
    box-shadow: none;
}

.block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.block-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--current-accent);
}

.intro-main-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-antracite);
}

.expandable-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    font-size: 1rem;
    line-height: 1.6;
}

.source-align-right {
    text-align: right;
    margin-top: 10px;
}

.btn-source--small {
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: default;
}

.btn-expand {
    margin-top: 15px;
    background: transparent;
    border: none;
    color: var(--current-accent);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.btn-stepper-prev {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 20px;
    padding: 5px 0;
    transition: color 0.2s;
}

.btn-stepper-prev:hover {
    color: var(--current-accent);
}

.btn-continua {
    margin-top: 15px;
    background: var(--current-accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 4px 15px rgba(var(--current-accent-rgb, 255, 255, 255), 0.3);
}

.btn-continua.hidden {
    display: none !important;
}

.btn-continua:hover {
    box-shadow: 0 6px 20px rgba(var(--current-accent-rgb, 255, 255, 255), 0.5);
    filter: brightness(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-expand .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.btn-expand.active .arrow {
    transform: rotate(180deg);
}

/* Question Box */
.question-box {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.question-box:last-of-type {
    border-bottom: none;
}

.question-text {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.button-row {
    display: flex;
    gap: 12px;
}

.btn-wizard {
    padding: 10px 30px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--uil-text-dark);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-wizard:hover {
    border-color: var(--current-accent);
    background: rgba(255, 255, 255, 0.05);
}

.btn-wizard.selected {
    background: var(--current-accent);
    color: white;
    border-color: var(--current-accent);
    box-shadow: 0 0 15px rgba(var(--current-accent-rgb, 255, 255, 255), 0.3);
}

.wizard-alert {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.05);
    /* Slight fill so it stands out */
    border: 1px solid var(--current-accent);
    color: #f0f0f0;
    /* Force light text instead of dark text */
    padding: 16px 20px;
    font-size: 1.05rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.wizard-alert .icon {
    font-size: 1.3rem;
    margin-top: 2px;
}

.wizard-alert.hidden {
    display: none !important;
}

/* Income Info Box */
.info-box-income {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--current-accent);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    color: var(--uil-text-dark);
}

.info-box-income p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.bold {
    font-weight: 900;
    color: var(--current-accent);
}

/* Conclusion CTA */
.conclusion-cta {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--uil-text-dark);
    margin: 0 auto 30px auto;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--current-accent);
    border-radius: 12px;
    padding: 20px 25px;
    max-width: 700px;
    box-shadow: 0 0 15px rgba(var(--current-accent-rgb, 255, 255, 255), 0.1);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.actions-secondary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-action-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--uil-text-dark);
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: left;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-action-outline:not(:disabled):hover {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.btn-action-solid {
    background: var(--current-accent);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(var(--current-accent-rgb, 255, 255, 255), 0.3);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-action-solid:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--current-accent-rgb, 255, 255, 255), 0.4);
    filter: brightness(1.1);
}

.btn-action-full {
    width: 100%;
    height: 100%;
}

.pointer-events-none,
.btn-action-outline:disabled,
.btn-action-solid:disabled {
    opacity: 0.7;
    cursor: default;
}

@media (max-width: 700px) {
    .action-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════
   VISTA INVALIDITA E LEGGE 104
   ══════════════════════════════════════════ */
.bivio-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px 24px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

@media (min-width: 768px) {
    .bivio-container {
        flex-direction: row;
        align-items: stretch;
    }
}

.btn-bivio {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    /* Use white to match new highly contrasting internal card styling */
    border-radius: 16px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--uil-text-dark);
}

.btn-bivio:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 20px var(--current-accent);
    border-color: var(--current-accent);
}

.bivio-icon {
    font-size: 3rem;
}

.bivio-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--uil-text-dark);
}

.block-procedura {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--current-accent);
    border-radius: 16px;
    color: var(--uil-text-dark);
}

.block-procedura p {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--uil-text-dark);
    margin-top: 10px;
}

/* ══════════════════════════════════════════
   VERBALE (RAMO B) - STILI FACSIMILE A4 E HOTSPOT
   ══════════════════════════════════════════ */

.a4-document-container {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 820px;
    padding: 40px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    /* Font più formale e burocratico */
    color: #000;
}

.a4-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.a4-header h2 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
}

.a4-header h1 {
    font-size: 1.8rem;
    margin: 0;
    text-transform: uppercase;
}

.verbale-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.verbale-section {
    border: 1px solid #aaa;
    padding: 15px;
    background: #fafafa;
}

.verbale-section-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.verbale-section p {
    margin: 5px 0 0 0;
    font-size: 1.05rem;
    line-height: 1.4;
}

/* Hotspots Interattivi */
.verbale-section.hotspot {
    background: rgba(255, 235, 59, 0.4);
    /* Giallo semitrasparente */
    border: 2px dashed #d4b106;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    animation: pulseYellow 3s infinite;
}

.verbale-section.hotspot:hover {
    background: rgba(255, 235, 59, 0.8);
    transform: scale(1.02);
    border-style: solid;
    animation: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes pulseYellow {
    0% {
        background: rgba(255, 235, 59, 0.2);
    }

    50% {
        background: rgba(255, 235, 59, 0.6);
    }

    100% {
        background: rgba(255, 235, 59, 0.2);
    }
}

/* ══════════════════════════════════════════
   WIZARD CHAT STYLE UI
   ══════════════════════════════════════════ */
.wizard-chat-container {
    width: 100%;
    max-width: 760px;
    /* Exact inner width of .wizard-block (820px - 60px padding) */
    margin: 0 auto 20px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 24px;
    /* Matches the wrapper horizontal padding for mobile consistency */
    box-sizing: border-box;
}

.chat-bubble-question {
    background: var(--antracite, #2A2C31);
    border-radius: 0;
    padding: 24px 30px;
    width: fit-content;
    max-width: 90%;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    border: 2px solid var(--current-accent, transparent);
}

.chat-bubble-question p {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--bianco, #ffffff);
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.chat-action-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    width: 100%;
}

.chat-pill-btn {
    background: transparent !important;
    border: 2px solid var(--antracite, #2A2C31) !important;
    border-radius: 0;
    padding: 14px 28px;
    color: var(--antracite, #2A2C31) !important;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chat-pill-btn:hover,
.chat-pill-btn.selected {
    background: var(--current-accent, #2A2C31) !important;
    color: var(--bianco, #ffffff) !important;
    border-color: var(--current-accent, #2A2C31) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Chat Vertical Animations */
.chat-enter-up {
    animation: chatEnterUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

.chat-exit-up {
    animation: chatExitUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes chatEnterUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatExitUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-40px);
    }
}

/* Final Action Block in Chat Wizard (e.g., PDF button) */
.chat-final-action {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 30px;
}

.btn-chat-pdf {
    background: var(--current-accent, #007bff) !important;
    color: var(--uil-text-dark) !important;
    border: none !important;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-chat-pdf:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(var(--current-accent-rgb, 255, 255, 255), 0.4);
    filter: brightness(1.1);
}

/* Progress Indicator */
.wizard-progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.wizard-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s, transform 0.3s;
}

.wizard-progress-dot.active {
    background: var(--current-accent, #fff);
    transform: scale(1.5);
}

/* Stepper & Wizard Layout (Chat-Like) */
.stepper-viewport {
    overflow: hidden;
    width: 100%;
}

.stepper-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.step-slide {
    flex: 0 0 100%;
    width: 100%;
    opacity: 1;
    /* Ensure slides are visible */
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Ensure wizards in .view--assegno-sociale (and others) are visible */
/* Specific overrides for wizards using standard action area */
.view--adi .action-area-standard,
.view--assegno-sociale .action-area-standard {
    position: relative;
    z-index: 10;
    margin-top: 40px;
}

/* Ensure wizard navigation buttons (Continua/Prev) are positioned above or below, not overlapping */
.view--adi .chat-final-action,
.view--adi .btn-continua,
.view--assegno-sociale .btn-continua {
    margin-bottom: 30px;
}

/* Force Invalidità Civil to use the standard single-row layout */
#view-invalidita .action-area-standard {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

@media (max-width: 850px) {
    .action-area-standard .side-actions {
        order: 2;
    }

    .action-area-standard .main-action {
        width: 100%;
        order: 1;
        margin-bottom: 20px;
    }
}

/* The original instruction had an extra ` !important; }` here, which is syntactically incorrect.
   Assuming it was a typo and removing it to maintain valid CSS.
   If it was intended to be part of a rule, please provide the full rule. */

/* Standardize block-header icons to use theme accent */
.block-header .icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--current-accent) !important;
}

.block-header .icon svg {
    width: 24px !important;
    height: 24px !important;
    stroke: var(--current-accent) !important;
}

.block-header .icon i, 
.block-header .icon span {
    color: var(--current-accent) !important;
}

/* Specific Wizard Block Adjustments */
.block-conclusion {
    opacity: 1 !important;
    visibility: visible !important;
}

.view--sedi {
    padding: calc(var(--header-h) + 10px) 30px calc(var(--footer-h) + 20px);
    align-items: center;
    overflow-y: auto;
}

.view--sedi .page-title {
    margin-bottom: 20px;
}

.sedi-layout {
    display: flex;
    gap: 30px;
    flex: 1;
    min-height: 0;
    margin-top: 10px;
    width: 100%;
    max-width: 1200px;
    /* Expanded from restricted width */
}

/* --- Map Column --- */
.sedi-map-wrapper {
    flex: 1.6;
    /* Increased prominence */
    min-width: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0d1117;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.sedi-map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.sedi-svg-map {
    width: 100%;
    height: 100%;
}

/* SVG Region paths */
.region-path {
    fill: rgba(255, 255, 255, 0.04);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
    transition: fill 0.3s, stroke 0.3s;
    cursor: default;
}

.region-pordenone {
    fill: rgba(0, 122, 255, 0.08);
}

.region-udine {
    fill: rgba(0, 122, 255, 0.06);
}

.region-gorizia {
    fill: rgba(0, 200, 150, 0.08);
}

.region-trieste {
    fill: rgba(0, 200, 150, 0.10);
}

.region-slovenia {
    fill: rgba(255, 200, 0, 0.06);
}

.region-croazia {
    fill: rgba(255, 100, 50, 0.06);
}

/* Coastline: land mass and shore line */
.coastline-land {
    fill: rgba(255, 255, 255, 0.025);
    stroke: none;
}

.coastline-stroke {
    fill: none;
    stroke: rgba(120, 180, 255, 0.25);
    stroke-width: 2;
    stroke-linejoin: round;
}

/* Province / Country Labels */
.province-label {
    fill: rgba(255, 255, 255, 0.25);
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-anchor: middle;
    letter-spacing: 3px;
    pointer-events: none;
}

.province-label--small {
    font-size: 13px;
    letter-spacing: 2px;
}

.country-label {
    fill: rgba(255, 255, 255, 0.20);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-anchor: middle;
    letter-spacing: 2px;
    pointer-events: none;
}

.country-label--sub {
    font-size: 11px;
    fill: rgba(255, 255, 255, 0.12);
    font-weight: 400;
}

.sea-label {
    fill: rgba(100, 160, 255, 0.12);
    font-size: 22px;
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 6px;
    pointer-events: none;
}

.border-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
    stroke-dasharray: 6 4;
}

/* SVG Pin Markers */
.svg-pin {
    cursor: pointer;
    transition: r 0.2s ease, fill 0.2s ease;
}

.svg-pin-dot {
    fill: #00aaff;
    filter: url(#glow);
    transition: r 0.2s, fill 0.2s;
}

.svg-pin-pulse {
    fill: none;
    stroke: rgba(0, 170, 255, 0.5);
    stroke-width: 1;
    animation: svgPulse 2.5s infinite ease-out;
}

@keyframes svgPulse {
    0% {
        r: 6;
        opacity: 0.8;
    }

    100% {
        r: 18;
        opacity: 0;
    }
}

.svg-pin:hover .svg-pin-dot,
.svg-pin.active .svg-pin-dot {
    fill: #fff;
    r: 7;
}

.svg-pin-label {
    fill: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    pointer-events: none;
    transition: fill 0.2s;
}

.svg-pin:hover .svg-pin-label,
.svg-pin.active .svg-pin-label {
    fill: #fff;
    font-weight: 700;
}

/* --- Info Column --- */
.sedi-info-wrapper {
    flex: 0.9;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Ensure column is scrollable and doesn't overflow viewport */
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 10px;
}

.sedi-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 220px;
    /* Fixed height for list to prioritize detail card space */
    padding-right: 4px;
    flex-shrink: 0;
}

.sedi-list-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #bbb;
    font-size: 0.92rem;
}

.sedi-list-item:hover {
    background: rgba(0, 170, 255, 0.08);
    border-color: rgba(0, 170, 255, 0.2);
    color: #fff;
}

.sedi-list-item.active {
    background: rgba(0, 170, 255, 0.12);
    border-color: rgba(0, 170, 255, 0.4);
    color: #fff;
}

.sedi-list-item .sedi-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00aaff;
    flex-shrink: 0;
}

.sedi-list-item .sedi-list-name {
    font-weight: 600;
}

.sedi-list-item .sedi-list-prov {
    color: #666;
    font-size: 0.82rem;
    margin-left: auto;
}

/* Detail Card */
.sedi-detail-card {
    flex: 1;
    background: #1a1a1e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    transition: all 0.3s ease;
}

.sedi-empty-state {
    text-align: center;
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
}

.sedi-nazione-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #00aaff;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 4px;
}

.sedi-citta {
    font-size: 2rem;
    color: #fff;
    font-weight: 800;
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.sedi-dettaglio-sub {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.sedi-dettaglio-item {
    margin-bottom: 14px;
    color: #ccc;
    font-size: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.4;
}

.sedi-dettaglio-item .sedi-icon {
    font-size: 1.2rem;
    opacity: 0.7;
    flex-shrink: 0;
    margin-top: 1px;
}

.sedi-dettaglio-item strong {
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .sedi-layout {
        flex-direction: column;
    }

    .sedi-map-wrapper {
        min-height: 300px;
        max-height: 50vh;
    }

    .sedi-info-wrapper {
        max-height: none;
    }

    .sedi-list {
        max-height: 200px;
    }
}