@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* Stessa definizione di dashboards.css — necessaria per le pagine senza dashboard */
.material-icon {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
}

.datatables-manager-container {
    margin: 20px 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Rimosso .datatables-manager-table wrapper - non più usato */

.datatables-manager-container h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5em;
}

.datatables-manager-container table {
    width: 100% !important;
}

/* Allinea a sinistra tutti i testi nelle celle delle tabelle DataTables */
.datatables-table th,
.datatables-table td {
    text-align: left !important;
    padding: 8px 10px;
}

table.dataTable th,
table.dataTable td {
    text-align: left !important;
}

table.dataTable th.text-center,
table.dataTable td.text-center,
table.dataTable th.text-right,
table.dataTable td.text-right,
table.dataTable .text-center,
table.dataTable .text-right {
    text-align: left !important;
}

/* Forza l'allineamento a sinistra anche se arrivano classi di utilità */
.datatables-table th.text-center,
.datatables-table td.text-center,
.datatables-table th.text-right,
.datatables-table td.text-right,
.datatables-table .text-center,
.datatables-table .text-right {
    text-align: left !important;
}


/* Assicura che anche gli header siano allineati a sinistra */
.datatables-table thead th {
    text-align: left !important;
    background-color: #f8f9fa;
}

/* Nasconde l'header della colonna azioni (freccia/rimuovi) */
.datatables-table thead th.gi-actions-cell,
table.dataTable thead th.gi-actions-cell {
    background: transparent !important;
    border-color: transparent !important;
    color: transparent !important;
    text-shadow: none !important;
}

.datatables-table thead th.gi-actions-cell .dtcc-dropdown,
table.dataTable thead th.gi-actions-cell .dtcc-dropdown {
    display: none !important;
}

/* Stili aggiuntivi per la tabella */
.datatables-table {
    border-collapse: collapse !important;
}

/*
 * Uniforma la tinta delle righe al tema DataTables originale.
 * In DT2 lo striping è un overlay (box-shadow), quindi fissiamo sia le variabili
 * ufficiali sia una base bianca delle celle per avere la stessa resa della demo.
 */
table.dataTable,
.datatables-table {
    --dt-row-stripe: 0, 0, 0;
    --dt-row-stripe-alpha: 0.05;
    --dt-row-hover: 0, 0, 0;
    --dt-row-hover-alpha: 0.075;
    --dt-column-ordering: 0, 0, 0;
    --dt-column-ordering-alpha: 0.019;
}

table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td,
.datatables-table > tbody > tr > th,
.datatables-table > tbody > tr > td {
    background-color: #fff;
}

/* Tinta righe coerente con Bootstrap 5 (.table-striped / .table-hover) */
table.dataTable.display > tbody > tr:nth-child(odd) > *,
table.dataTable.stripe > tbody > tr:nth-child(odd) > *,
.datatables-table.display > tbody > tr:nth-child(odd) > * {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05);
}

table.dataTable.display > tbody > tr:hover > *,
table.dataTable.hover > tbody > tr:hover > *,
.datatables-table.display > tbody > tr:hover > * {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.075);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-bottom: 10px;
}

.datatables-manager-container .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.datatables-manager-container .dataTables_filter input {
    margin-left: 0;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 100%;
    min-width: 240px;
    max-width: none;
}

/* Allinea la barra di ricerca allo stile della dashboard consulente */
.datatables-manager-container .datatables-top-controls {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    justify-content: space-between !important;
}
.datatables-manager-container .datatables-top-controls .dataTables_length {
    flex: 0 0 auto !important;
    margin: 0 !important;
    float: none !important;
}
.datatables-manager-container .datatables-top-controls .dataTables_filter {
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    float: none !important;
}
.datatables-manager-container .datatables-top-controls .dataTables_filter label {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}
.datatables-manager-container .datatables-top-controls .dataTables_filter input {
    width: 100% !important;
    min-width: 240px !important;
    max-width: none !important;
    margin-left: 0 !important;
}

/* DataTables 2: dt-search */
.datatables-manager-container .datatables-top-controls .dt-search {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}
.datatables-manager-container .datatables-top-controls .dt-search label {
    margin: 0;
}
.datatables-manager-container .datatables-top-controls .dt-search .dt-input {
    width: 100%;
    min-width: 240px;
    max-width: none;
}
.datatables-manager-container input[type="text"]:focus,
.datatables-manager-container input[type="search"]:focus,
.datatables-manager-container input[type="email"]:focus,
.datatables-manager-container input[type="password"]:focus,
.datatables-manager-container input[type="url"]:focus,
.datatables-manager-container input[type="tel"]:focus,
.datatables-manager-container input[type="date"]:focus,
.datatables-manager-container input[type="number"]:focus,
.datatables-manager-container textarea:focus,
.datatables-manager-container select:focus,
.datatables-manager-container .dt-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.datatables-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 10px 0;
}

/* Stili per il pulsante di switching */
.table-switch-container {
    margin-bottom: 20px;
    text-align: left;
}

.table-switch-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-switch-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.table-switch-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-switch-btn.biologica {
    background-color: #4CAF50;
}

.table-switch-btn.biologica:hover {
    background-color: #45a049;
}

/* Animazioni per il cambio tabella */
.table-content {
    transition: opacity 0.3s ease;
}

.table-content.switching {
    opacity: 0.5;
}

/* Stili per il filtro date */
.date-filter-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.date-filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter-group label {
    font-weight: 600;
    color: #495057;
    margin: 0;
    white-space: nowrap;
}

.date-filter-group input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    min-width: 140px;
    color: #495057;
}

.date-filter-group input[type="date"]:not(:focus):invalid {
    color: #6c757d;
}

.date-filter-group input[type="date"]:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.date-filter-actions {
    display: flex;
    gap: 10px;
}

.date-filter-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.date-filter-btn:hover {
    background-color: #005a87;
}

.date-filter-btn.disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
}

.date-filter-btn.disabled:hover {
    background-color: #ccc;
}

.date-filter-btn.reset {
    background-color: #6c757d;
}

.date-filter-btn.reset:hover {
    background-color: #545b62;
}

/* Stili per header con doppia riga */
.datatables-table thead tr.no-sort th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    text-align: left;
    cursor: default;
}

.datatables-table thead tr.no-sort th:hover {
    background-color: #f8f9fa;
}

/* Stili per nitrati multi-file mode */
.nitrati-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.nitrati-sidebar {
    flex: 0 0 250px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.nitrati-sidebar h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.nitrati-date-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nitrati-date-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    color: #495057;
}

.nitrati-date-search:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.nitrati-date-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: #fff;
}

.nitrati-date-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nitrati-date-group + .nitrati-date-group {
    margin-top: 8px;
}

.nitrati-date-group-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2e7d32;
    padding: 2px 4px;
}

.nitrati-date-item {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 8px 10px;
    background-color: #fff;
    color: #495057;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nitrati-date-item:hover {
    background-color: #f1f3f5;
}

.nitrati-date-item:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.nitrati-date-item.is-active {
    background-color: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

.nitrati-date-empty {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
}

/* Stili per i pulsanti di navigazione nitrati */
.nitrati-navigation {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.nitrati-nav-btn {
    padding: 8px 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.nitrati-nav-btn:hover:not(:disabled) {
    background-color: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.nitrati-nav-btn:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
}

.nitrati-content {
    flex: 1;
    min-width: 0;
}

.nitrati-loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Stili per tabelle nitrati semplici (senza DataTables) */
.nitrati-simple-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nitrati-simple-table thead th {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    vertical-align: middle;
}

.nitrati-simple-table tbody td {
    border: 1px solid #dee2e6;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
}

.nitrati-simple-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.nitrati-simple-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Header complessi */
.nitrati-simple-table thead tr.no-sort th {
    background-color: #e9ecef;
    font-weight: 700;
    color: #495057;
}

/* Scroll orizzontale per tabelle larghe */
.nitrati-content {
    overflow-x: auto;
}

/* Responsive design per nitrati */
@media (max-width: 768px) {
    .nitrati-layout {
        flex-direction: column;
        gap: 15px;
    }

    .nitrati-sidebar {
        flex: none;
        width: 100%;
    }

    .nitrati-simple-table {
        font-size: 12px;
    }

    .nitrati-simple-table th,
    .nitrati-simple-table td {
        padding: 4px 6px;
    }
}

@media (max-width: 768px) {
    .date-filter-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-filter-group {
        width: 100%;
    }

    .date-filter-group input[type="date"] {
        flex: 1;
        min-width: auto;
    }
}

/* CSS pulito per le tabelle deroghe */
.deroghe-table td {
    text-align: justify !important;
}

/* Bollettini regionali */
.datatables-bollettini {
    width: 100% !important;
    border-collapse: collapse !important;
}

.datatables-bollettini th,
.datatables-bollettini td {
    text-align: left !important;
}

.datatables-bollettini thead th {
    text-align: left !important;
    background-color: #f8f9fa;
}

.bollettini-coltura-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #0073aa;
    font-weight: 600;
}

.bollettini-coltura-toggle:hover,
.bollettini-coltura-toggle:focus {
    text-decoration: underline;
}

.bollettini-coltura-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.35);
    border-radius: 4px;
}

.bollettini-detail-row td {
    padding: 0 !important;
}

.bollettini-detail-container {
    padding: 16px 20px;
    background-color: #f8fbff;
}

.bollettini-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.bollettini-detail-table th,
.bollettini-detail-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #e1e7ef;
}

.bollettini-detail-table td {
    text-align: justify !important;
}

.bollettini-detail-table th {
    width: 25%;
    font-weight: 600;
    background-color: #eef4fb;
}

.bollettini-detail-open {
    background-color: #f2f8ff;
}

/* ColumnControl menu adjustments */
.dtcc-menu-compact .dtcc-button-icon {
    margin-right: 0;
}

.dtcc-dropdown .dtcc-button,
.dtcc-dropdown .dtcc-button-text,
.dtcc-dropdown .dtcc-list-title,
.dtcc-dropdown .dtcc-list-selectAll,
.dtcc-dropdown .dtcc-list-selectNone {
    font-size: 0.85rem;
}

.dtcc-dropdown .dtcc-search input {
    font-size: 0.85rem;
}

/* Stili per i controlli in linea nei bollettini regionali */
.datatables-top-controls {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px;
    gap: 20px;
    flex-wrap: nowrap !important;
}

.datatables-top-controls .dataTables_length {
    margin: 0;
    flex-shrink: 0;
}

.datatables-top-controls .dataTables_filter {
    margin: 0;
    flex-shrink: 0;
}

.datatables-top-controls .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.datatables-top-controls .dataTables_filter input {
    margin: 0;
    min-width: 200px;
}

/* Responsive per controlli in linea - solo su schermi molto piccoli */
@media (max-width: 600px) {
    .datatables-top-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }

    .datatables-top-controls .dataTables_filter input {
        min-width: auto;
        width: 100%;
    }
}

/* =============================================================================
   POESIS PDF VIEWER — pattern allegato-overlay (coerente con dashboards.css)
   ============================================================================= */

/* --- Pulsante "Vedi PDF originale" — stile verde identico a pdfjs-btn-green in dashboard --- */
.poesis-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #5b9144;
    border-radius: 4px;
    color: #fff;
    background: #6aa84f;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.15s ease;
    vertical-align: middle;
}

.poesis-pdf-btn:hover,
.poesis-pdf-btn:focus {
    background: #5b9144;
    outline: none;
}

.poesis-pdf-btn svg {
    flex-shrink: 0;
}

/* Toolbar sopra le tabelle (usi_eccezionali, integrazione) */
.poesis-pdf-toolbar {
    margin-bottom: 12px;
}

/* Toolbar nella sidebar nitrati */
.nitrati-pdf-toolbar {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Pulsante PDF nelle righe deroghe */
.deroga-filename {
    white-space: normal;
}

.deroga-pdf-btn {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    padding: 4px 10px;
}

/* Pulsante PDF nel pannello dettaglio bollettini (ora sopra la tabella) */
.bollettino-detail-pdf {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

body.poesis-pdf-overlay-open {
    overflow: hidden;
}

/* --- Overlay full-screen — coerente al pattern dashboard/allegato --- */
.poesis-pdf-overlay,
.poesis-pdf-overlay.allegato-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.poesis-pdf-overlay.show,
.poesis-pdf-overlay.allegato-overlay.show {
    display: flex;
}

/* Content box */
.poesis-pdf-overlay-content,
.poesis-pdf-overlay .allegato-overlay-content {
    background: #fff;
    width: clamp(420px, 72vw, 1240px);
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    box-sizing: border-box;
}

.poesis-pdf-overlay.pdf-zoomed .poesis-pdf-overlay-content,
.poesis-pdf-overlay.pdf-zoomed .allegato-overlay-content {
    width: 90vw;
    max-width: 90vw;
    max-height: 80vh;
}

/* Header */
.poesis-pdf-overlay-header,
.poesis-pdf-overlay .allegato-overlay-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    min-height: 48px;
    background: #6aa84f;
    border-bottom: 1px solid #5b9144;
    flex-shrink: 0;
    box-sizing: border-box;
}

.poesis-pdf-close,
.poesis-pdf-overlay .allegato-overlay-close {
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    margin-left: auto;
    background: transparent;
    border: none;
    flex-shrink: 0;
    color: #fff;
}

.poesis-pdf-close:hover,
.poesis-pdf-overlay .allegato-overlay-close:hover {
    color: #f0f0f0;
}

/* Body + Footer */
.poesis-pdf-overlay-body,
.poesis-pdf-overlay .allegato-overlay-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.poesis-pdf-overlay .allegato-overlay-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    box-sizing: border-box;
    display: none;
}

.poesis-pdf-overlay .allegato-overlay-footer:not(:empty) {
    display: block;
}

.poesis-pdf-title,
.poesis-pdf-overlay .allegato-overlay-title {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

.poesis-pdf-overlay .allegato-link-download {
    display: inline-block;
    margin-top: 0;
    background: #6aa84f;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #5b9144;
    font-weight: 600;
    cursor: pointer;
    font: inherit;
}

.poesis-pdf-overlay .allegato-link-download:hover {
    background: #5b9144;
    border-color: #52853c;
}

/* --- Viewer PDF — stessa struttura di .pdfjs-viewer in dashboards.css --- */
.poesis-pdfjs-viewer,
.poesis-pdf-overlay .pdfjs-viewer {
    background: #f8f8f8;
    padding: 8px;
    border-radius: 6px;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    overflow: auto;
    min-height: 0;
}

.poesis-pdfjs-toolbar,
.poesis-pdf-overlay .pdfjs-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.poesis-pdfjs-btn,
.poesis-pdf-overlay .pdfjs-btn {
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #6aa84f;
    color: #fff;
    transition: background 0.2s ease, transform 0.1s ease;
}

.poesis-pdfjs-btn:hover:not(:disabled),
.poesis-pdf-overlay .pdfjs-btn:hover:not(:disabled) {
    background: #5b9144;
}

.poesis-pdfjs-btn:active:not(:disabled),
.poesis-pdf-overlay .pdfjs-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.poesis-pdfjs-btn:disabled,
.poesis-pdf-overlay .pdfjs-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.poesis-pdfjs-pageinfo,
.poesis-pdf-overlay .pdfjs-pageinfo {
    font-weight: 600;
    color: #2b2b2b;
}

.poesis-pdfjs-loading,
.poesis-pdf-overlay .pdfjs-loading {
    padding: 32px 16px;
    text-align: center;
    color: #555;
    font-size: 13px;
    width: 100%;
}

.poesis-pdfjs-canvas,
.poesis-pdf-overlay .pdfjs-canvas {
    max-width: 100%;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
}

.poesis-pdfjs-canvas.zoomed,
.poesis-pdf-overlay .pdfjs-canvas.zoomed {
    cursor: zoom-out;
    max-width: none;
    max-height: none;
}

.poesis-pdf-overlay .pdfjs-native-frame {
    width: 100%;
    min-height: 70vh;
    border: 0;
    border-radius: 6px;
    background: #fff;
}

.poesis-pdf-overlay .pdfjs-native-open {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .poesis-pdf-overlay-content,
    .poesis-pdf-overlay .allegato-overlay-content {
        width: 98vw;
        max-height: 96vh;
        border-radius: 4px;
    }
}
