/* ====================================================================================
 * File: ordini.css
 * Tema: astra-child
 * Data: 01-08-2025
 * Versione: 3.0.5 (FIX: Posizionamento pulsanti scroll)
 * Descrizione: Stili completi per il sistema di ordini ACSN.
 *              - Correzione definitiva per la sovrapposizione dei pulsanti di scorrimento.
 * ==================================================================================== */

/* ============================================
 * Blocco 1: Stili Generali e Helper
 * ============================================ */
.form-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    box-sizing: border-box;
}

.button-style,
.custom-button,
.laboratorio-ordini-table .button,
.wp-list-table .button {
    background-color: #0073aa;
    color: #ffffff;
    padding: 10px 18px;
    font-size: 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    text-decoration: none;
    display: inline-block;
    margin: 4px;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.laboratorio-ordini-table .button.button-small,
.wp-list-table .button.button-small {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
    margin: 2px;
}

.button-style:hover,
.custom-button:hover,
.laboratorio-ordini-table .button:hover,
.wp-list-table .button:hover {
    background-color: #005177;
    color: #ffffff;
}

.button-style:focus,
.custom-button:focus,
.laboratorio-ordini-table .button:focus,
.wp-list-table .button:focus {
    background-color: #005177;
    border-color: #00a0d2;
    box-shadow: 0 0 0 1px #00a0d2;
    outline: 1px solid transparent;
    color: #ffffff;
}

.button-clicked {
    background-color: #4CAF50;
    cursor: default;
}
.button-style:disabled,
.custom-button:disabled,
.laboratorio-ordini-table .button:disabled,
.wp-list-table .button:disabled {
    background-color: #a0a5aa !important;
    border-color: #a0a5aa !important;
    color: #f0f0f0 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    box-shadow: none !important;
}

.button-container {
    margin-top: 25px;
    text-align: center;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    margin-bottom: 20px;
    justify-content: flex-start;
}
.radio-option {
    display: flex;
    align-items: center;
}
.radio-option input[type="radio"] {
    margin-right: 8px;
}

.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

.acsn-btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}
.acsn-btn-danger:hover,
.acsn-btn-danger:focus {
    background-color: #b42b2d !important;
    border-color: #b42b2d !important;
}

/* --- FINE BLOCCO 1 --- */

/* ===================================================================
 * Blocco 2: Modulo Anagrafica Cliente (#anagrafica-form)
 * =================================================================== */
#anagrafica-form .section { background-color: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 4px; padding: 20px 25px; margin-bottom: 25px; }
#anagrafica-form .section h3 { color: #1d2327; margin-top: 0; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #ccd0d4; font-size: 1.2em; text-align: left; }
#anagrafica-form .form-group { margin-bottom: 16px; }
#anagrafica-form .form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; color: #3c434a; }
#anagrafica-form label.required::after, #anagrafica-form .section .form-group span.required::after { content: "*"; color: #d63638; margin-left: 3px; font-weight: normal; }
#anagrafica-form .section .form-group span.required { color: inherit; font-weight: 600; }
#anagrafica-form .form-group input[type="text"], #anagrafica-form .form-group input[type="tel"], #anagrafica-form .form-group input[type="number"], #anagrafica-form .form-group input[type="email"], #anagrafica-form .form-group select, #anagrafica-form .form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #8c8f94; border-radius: 3px; font-size: 14px; box-sizing: border-box; background-color: #fff; box-shadow: inset 0 1px 1px rgba(0,0,0,0.05); height: auto; line-height: 1.4; color: #3c434a; }
#anagrafica-form .form-group textarea { min-height: 70px; }
#anagrafica-form .form-group input:focus, #anagrafica-form .form-group select:focus, #anagrafica-form .form-group textarea:focus { border-color: #007cba; box-shadow: 0 0 0 1px #007cba; outline: 1px solid transparent; }
#anagrafica-form .checkbox-group label { font-weight: normal; }
#anagrafica-form .error-message { color: #d63638; font-size: 12px; display: none; margin-top: 4px; }
#anagrafica-form input.error, #anagrafica-form select.error, #anagrafica-form textarea.error { border-color: #d63638 !important; }
#anagrafica-form input.error:focus, #anagrafica-form select.error:focus, #anagrafica-form textarea.error:focus { box-shadow: 0 0 0 1px #d63638 !important; }
#shipping_fields { margin-top: 15px; padding-left: 15px; border-left: 2px solid #dcdcde; }
#anagrafica-form input:disabled, #anagrafica-form select:disabled, #anagrafica-form textarea:disabled { background-color: #f6f7f7; border-color: #dcdcde; color: #a0a5aa; cursor: not-allowed; opacity: 0.7; }
#anagrafica-form input[type="checkbox"]:disabled + label { opacity: 0.7; cursor: not-allowed; }
#anagrafica-form input[type="checkbox"]#same_address, #anagrafica-form input[type="checkbox"]#same_fiscal_code { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid #8c8f94; border-radius: 3px; outline: none; cursor: pointer; vertical-align: middle; margin-right: 6px; background-color: #fff; position: relative; }
#anagrafica-form input[type="checkbox"]#same_address:checked, #anagrafica-form input[type="checkbox"]#same_fiscal_code:checked { background-color: #0073aa; border-color: #0073aa; }
#anagrafica-form input[type="checkbox"]#same_address:checked::before, #anagrafica-form input[type="checkbox"]#same_fiscal_code:checked::before { content: '\f147'; font-family: dashicons; display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 16px; line-height: 1; }
#anagrafica-form input[type="checkbox"]#same_address:focus, #anagrafica-form input[type="checkbox"]#same_fiscal_code:focus { border-color: #007cba; box-shadow: 0 0 0 1px #007cba; }
.qualifica-group #qualifica_referente_altro_container label { font-weight: normal; font-size: 0.95em; }
#qualifica_referente_altro_label.label-required::after { content: " *"; color: #d63638; font-weight: normal; }

/* --- FINE BLOCCO 2 --- */

/* ===================================================================
 * Blocco 3: Pagina Dettagli Ordine (#order-form-container)
 * =================================================================== */
#order-form-container { display: flex; flex-direction: column; width: 100%; max-width: 900px; margin: 30px auto; padding: 0 15px; box-sizing: border-box; }
#order-form-container .item-container { display: flex; align-items: flex-start; padding: 15px; border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 15px; background-color: #fff; }
#order-form-container .item-image { margin-right: 15px; flex-shrink: 0; }
#order-form-container .item-image img { width: 70px; height: auto; border-radius: 3px; }
#order-form-container .item-details { display: flex; flex-direction: column; justify-content: flex-start; flex-grow: 1; }
#order-form-container .item-details .description { font-weight: 600; margin-bottom: 4px; font-size: 1.0em; }
#order-form-container .item-details .price { font-size: 0.9em; color: #444; margin-bottom: 8px; }
#order-form-container .item-details .quantity-totals { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 15px; flex-wrap: nowrap; }
#order-form-container .item-details .form-group { margin-bottom: 0; display: block; width: auto; min-width: 160px; flex-shrink: 0; box-sizing: border-box; }
#order-form-container .item-details .form-group select { width: 100%; padding: 6px 8px; font-size: 14px; box-sizing: border-box; border: 1px solid #8c8f94; line-height: normal; height: auto; min-height: 36px; border-radius: 3px; }
#order-form-container .item-details div[id^="subtotal-"] { font-size: 0.95em; text-align: right; color: #0073aa; white-space: nowrap; }
#order-form-container .item-details div[id^="subtotal-"] .subtotal-value { font-weight: 600; }
#shipping-details { margin-top: 30px; padding: 20px; border: 1px solid #e0e0e0; border-radius: 4px; background-color: #f9f9f9; }
#shipping-details h2 { margin-top: 0; margin-bottom: 15px; font-size: 1.1em; color: #1d2327; }
#riepilogo-ordine-heading { margin-top: 30px; margin-bottom: 15px; font-size: 1.3em; text-align: center; }
#order-form-container #order-summary-table-container { overflow-x: auto; width: 100%; margin-top: 10px; -webkit-overflow-scrolling: touch; border: 1px solid #e0e0e0; border-radius: 4px;}
#order-form-container #order-summary-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: auto; }
#order-form-container #order-summary-table th { background-color: #f0f0f0; font-weight: bold; text-align: center; border: 1px solid #ddd; padding: 8px 10px; vertical-align: middle; white-space: nowrap; }
#order-form-container #order-summary-table th:first-child { text-align: left; }
#order-form-container #order-summary-table th:nth-child(3), #order-form-container #order-summary-table th:nth-child(4) { text-align: right; }
#order-form-container #order-summary-table td { border: 1px solid #ddd; padding: 8px 10px; vertical-align: middle; white-space: nowrap; text-align: left; font-weight: normal; }
#order-form-container #order-summary-table td:nth-child(2) { text-align: center; }
#order-form-container #order-summary-table td:nth-child(3), #order-form-container #order-summary-table td:nth-child(4) { text-align: right; }
#order-form-container #order-summary-table tr.order-summary-total td:first-child, #order-form-container #order-summary-table tr.order-summary-shipping td:first-child, #order-form-container #order-summary-table tr.order-summary-tax td:first-child, #order-form-container #order-summary-table tr.order-summary-final td:first-child { text-align: right; padding-right: 15px; background-color: transparent; }
#order-form-container #order-summary-table tr.order-summary-total td:last-child, #order-form-container #order-summary-table tr.order-summary-shipping td:last-child, #order-form-container #order-summary-table tr.order-summary-tax td:last-child, #order-form-container #order-summary-table tr.order-summary-final td:last-child { text-align: right; background-color: transparent; }
#order-form-container #order-summary-table tr.order-summary-total td { border-top: 2px solid #ccc; background-color: #f9f9f9; }
#order-form-container #order-summary-table tr.order-summary-total td:first-child { font-weight: bold; }
#order-form-container #order-summary-table tr.order-summary-total td:last-child { font-weight: bold; }
#order-form-container #order-summary-table tr.order-summary-shipping td:first-child, #order-form-container #order-summary-table tr.order-summary-tax td:first-child { font-weight: normal; }
#order-form-container #order-summary-table tr.order-summary-shipping td:last-child, #order-form-container #order-summary-table tr.order-summary-tax td:last-child { font-weight: normal; }
#order-form-container #order-summary-table tr.order-summary-final td { border-top: 2px solid #333; background-color: #eeeeee; font-size: 1.1em; font-weight: bold !important; }
#order-form-container #order-summary-table tr.order-summary-final td:first-child { text-align: right; padding-right: 15px; }
#order-form-container #order-summary-table tr.order-summary-final td:last-child { text-align: right; }
#final-buttons .custom-button { margin: 5px 2px; }
#order-confirmation-message { display: none; margin-top: 20px; padding: 15px; border-left-width: 5px; border-left-style: solid; border-radius: 4px; }
#order-confirmation-message[data-status="success"] { background-color: #e9f7ef; border-left-color: #28a745; color: #155724; }
#order-confirmation-message[data-status="info"]    { background-color: #e7f5ff; border-left-color: #0073aa; color: #004085; }
#order-confirmation-message[data-status="error"]   { background-color: #f8d7da; border-left-color: #d63638; color: #721c24; }
#order-confirmation-message p { margin-bottom: 8px; line-height: 1.6; }
#order-confirmation-message ul { margin-bottom: 12px; padding-left: 20px; }
#order-confirmation-message a { color: #005177; text-decoration: underline; }
#order-confirmation-message a:hover { color: #003355; }

/* ===================================================================
 * CORREZIONE PULSANTI SCROLL
 * =================================================================== */
:root {
  --scrollbar-width: 15px; /* Valore di fallback se JS fallisce */
}
#scroll-buttons-container {
    position: fixed !important;
    bottom: 20px !important;
    /* Forza il posizionamento a 25px dal bordo destro */
    right: 75px !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}
#scroll-buttons-container button {
    background-color: rgba(0, 115, 170, 0.8) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    line-height: 40px !important;
    text-align: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    transition: background-color 0.3s ease !important;
    padding: 0 !important;
}
#scroll-buttons-container button:hover {
    background-color: rgba(0, 81, 119, 0.9) !important;
}

@media (max-width: 768px) {
    #scroll-buttons-container {
        right: 15px !important;
        bottom: 15px !important;
    }
}
/* --- FINE BLOCCO 3 --- */

/* ===================================================================
 * Blocco 4: Tabella Admin (Pagina Gestione Ordini Backend)
 * =================================================================== */
body.toplevel_page_ordini-acsn table.wp-list-table th.column-numero, body.toplevel_page_ordini-acsn table.wp-list-table td.column-numero { text-align: right; padding-right: 15px; }
body.toplevel_page_ordini-acsn table.wp-list-table th.column-numero-ordine, body.toplevel_page_ordini-acsn table.wp-list-table td.column-numero-ordine { width: 100px; text-align: center; }
body.toplevel_page_ordini-acsn table.wp-list-table th.column-date, body.toplevel_page_ordini-acsn table.wp-list-table td.column-date { width: 130px; text-align: center;}
body.toplevel_page_ordini-acsn table.wp-list-table th.column-spedizione, body.toplevel_page_ordini-acsn table.wp-list-table td.column-spedizione { width: 90px; text-align: center;}
body.toplevel_page_ordini-acsn table.wp-list-table th.column-pdf, body.toplevel_page_ordini-acsn table.wp-list-table td.column-pdf { width: 90px; text-align: center; }
body.toplevel_page_ordini-acsn table.wp-list-table td.column-pdf .button { margin-left: auto; margin-right: auto; display: inline-block; }
body.toplevel_page_ordini-acsn table.wp-list-table td { vertical-align: middle; }

/* --- FINE BLOCCO 4 --- */

/* ===========================================================================
 * Blocco 5: Tabella Laboratorio (Layout Adattivo Definitivo)
 * =========================================================================== */
.laboratorio-table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.laboratorio-ordini-table { width: 100%; min-width: 1650px; border-collapse: collapse; table-layout: auto; font-size: 13px; }
.laboratorio-ordini-table th, .laboratorio-ordini-table td { border: 1px solid #e0e0e0; padding: 0; vertical-align: middle; text-align: center; }
.laboratorio-ordini-table th { font-weight: bold; }
.laboratorio-ordini-table th:nth-child(1) { width: 5%; }
.laboratorio-ordini-table th:nth-child(2) { width: 15%; }
.laboratorio-ordini-table th:nth-child(3) { width: 8%; }
.laboratorio-ordini-table th:nth-child(4) { width: 7%; }
.laboratorio-ordini-table th:nth-child(5) { width: 5%; }
.laboratorio-ordini-table th:nth-child(6) { width: 5%; }
.laboratorio-ordini-table th:nth-child(7) { width: 14%; }
.laboratorio-ordini-table th:nth-child(8) { width: 8%; }
.laboratorio-ordini-table th:nth-child(9) { width: 11%; }
.laboratorio-ordini-table th:nth-child(10){ width: 11%; }
.laboratorio-ordini-table th:nth-child(11){ width: 11%; }
.laboratorio-ordini-table td > div.cell-content-wrapper { display: flex; align-items: center; justify-content: center; padding: 6px 8px; min-height: 38px; width: 100%; height: 100%; box-sizing: border-box; flex-wrap: nowrap; white-space: nowrap; }
.laboratorio-ordini-table td .order-number-cell { justify-content: flex-start; }
.laboratorio-ordini-table td:nth-child(2) > div.cell-content-wrapper { justify-content: flex-start; text-align: left; flex-direction: column; align-items: flex-start; white-space: normal; }
.laboratorio-ordini-table td:nth-child(4) > div.cell-content-wrapper { justify-content: flex-end; padding-right: 10px; }
.laboratorio-ordini-table td:nth-child(7) > div.cell-content-wrapper { justify-content: flex-start; }
.laboratorio-ordini-table .ldv-cell-wrapper { flex-direction: column; justify-content: center; align-items: stretch; gap: 4px; padding: 4px 6px; }
.laboratorio-ordini-table .ldv-tracking-row { text-align: center; width: 100%; }
.laboratorio-ordini-table .ldv-actions-row { display: flex; justify-content: center; align-items: center; gap: 4px; width: 100%; }
.laboratorio-ordini-table .ldv-actions-row .button, .laboratorio-ordini-table .ldv-actions-row .button-icon { margin: 0; }
.laboratorio-ordini-table td:nth-child(11) > div.cell-content-wrapper { flex-direction: column; gap: 2px; white-space: normal; }
.laboratorio-ordini-table .acsn-lab-invoice-input, .laboratorio-ordini-table td .button { height: 30px; line-height: 28px; padding-top: 0; padding-bottom: 0; font-size: 12px; border-radius: 3px; box-sizing: border-box; vertical-align: middle; margin: 0 2px; }
.laboratorio-ordini-table .acsn-lab-invoice-input { border: 1px solid #b0b0b0; }
.laboratorio-ordini-table td .button { border-color: transparent; padding-left: 10px; padding-right: 10px; }
.laboratorio-ordini-table td .button.button-small { padding-left: 8px; padding-right: 8px; font-size: 11px; }
.laboratorio-ordini-table .acsn-lab-invoice-input[data-field="date"] { width: 100%; min-width: 130px; }
.laboratorio-ordini-table td a.view-invoice-pdf-link, .laboratorio-ordini-table td a.ldv-tracking-link { text-decoration: underline; color: #0073aa; margin-right: 5px; flex-shrink: 0; }
.laboratorio-ordini-table td a.view-invoice-pdf-link:hover, .laboratorio-ordini-table td a.ldv-tracking-link:hover { color: #005177; }
.laboratorio-ordini-table .view-order-details-link { text-decoration: underline; color: #0073aa; cursor: pointer; }
.laboratorio-ordini-table .view-order-details-link:hover { color: #005177; }
.laboratorio-ordini-table .invoice-save-status, .laboratorio-ordini-table .invoice-date-save-status, .laboratorio-ordini-table .ldv-action-status, .laboratorio-ordini-table .invoice-notes-save-status, .laboratorio-ordini-table .ldv-notes-save-status { display: none; vertical-align: middle; margin-left: 5px; font-size: 0.8em; flex-shrink: 0; }
.laboratorio-ordini-table td small { display: block; font-size: 0.85em; color: #555; margin-top: 1px; line-height: 1.2; }
.laboratorio-ordini-table .button.ldv-request-button { background-color: #f59e0b; border-color: #d97706; color: #ffffff; }
.laboratorio-ordini-table .button.ldv-request-button:hover { background-color: #d97706; border-color: #b45309; }
.laboratorio-ordini-table .button.ldv-request-button:focus { box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px #f59e0b; }

/* --- FINE BLOCCO 5 --- */

/* ===================================================================
 * Blocco 6: Modali Generiche e Dettaglio Ordine
 * =================================================================== */
.acsn-modal-common { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10000; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.acsn-modal-common.modal-visible { display: flex !important; }
.acsn-modal-common .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.65); z-index: 1; cursor: pointer; }
.acsn-modal-common .modal-content { position: relative; background-color: #ffffff; padding: 25px 30px; border-radius: 6px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); z-index: 2; width: 100%; margin: auto; overflow-y: auto; max-height: 90vh; }
.acsn-modal-common .modal-close-btn { position: absolute; top: 8px; right: 10px; background: transparent; border: none; font-size: 26px; line-height: 1; color: #666666; cursor: pointer; padding: 5px; z-index: 3; }
.acsn-modal-common .modal-close-btn:hover { color: #1d2327; }
#acsn-lab-order-modal .modal-content { max-width: 650px; }
#acsn-lab-order-modal .modal-content h2 { margin-top: 0; margin-bottom: 20px; font-size: 1.3em; color: #1d2327; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; }
#acsn-lab-order-modal .modal-content h2 span { font-weight: bold; color: #0073aa; }
#acsn-lab-order-modal .modal-section { margin-bottom: 12px; font-size: 0.9em; line-height: 1.5; }
#acsn-lab-order-modal .modal-section strong { display: inline-block; color: #3c434a; margin-right: 5px; min-width: 130px; font-weight: 600;}
#acsn-lab-order-modal #modal-order-items { list-style: disc; padding-left: 20px; margin-top: 5px; margin-bottom: 0; }
#acsn-lab-order-modal #modal-order-items li { margin-bottom: 4px; }
#acsn-lab-order-modal #modal-loading { font-style: italic; color: #50575e; text-align:center; padding: 25px; }
#acsn-lab-order-modal #modal-pickup-location-section, #acsn-lab-order-modal #modal-ldv-andata-notes-section, #acsn-lab-order-modal #modal-ldv-riconsegna-notes-section { padding: 10px; background-color: #f6f7f7; border-left: 3px solid #0073aa; margin-top: 12px; border-radius: 3px; }
#acsn-lab-order-modal #modal-ldv-andata-notes, #acsn-lab-order-modal #modal-ldv-riconsegna-notes { display: block; white-space: pre-wrap; font-style: italic; color: #3c434a; font-size: 0.95em; }

/* --- FINE BLOCCO 6 --- */

/* ===================================================================
 * Blocco 7: Modali Upload (LDV, Fattura) e Azioni
 * =================================================================== */
.acsn-modal-common#invoice-pdf-modal .modal-content, .acsn-modal-common#andata-ldv-modal .modal-content, .acsn-modal-common#riconsegna-ldv-modal .modal-content, .acsn-modal-common#ldv-received-date-modal .modal-content { max-width: 480px; }
.acsn-modal-common .modal-content h4 { margin-top: 0; margin-bottom: 20px; font-size: 1.15em; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; color: #1d2327; }
.acsn-modal-common .modal-content h4 span { font-weight: normal; font-size: 0.9em; color: #50575e; }
.acsn-modal-common .modal-content .form-row { margin-bottom: 15px; }
.acsn-modal-common .modal-content .form-row label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; color: #3c434a; }
.acsn-modal-common .modal-content input[type="file"], .acsn-modal-common .modal-content input[type="date"], .acsn-modal-common .modal-content textarea { width: 100%; padding: 8px 10px; border: 1px solid #8c8f94; border-radius: 3px; box-sizing: border-box; font-size: 13px; }
.acsn-modal-common .modal-content textarea { min-height: 60px; line-height: 1.5; }
.acsn-modal-common .modal-content .modal-actions { text-align: right; margin-top: 20px; padding-top: 15px; border-top: 1px solid #e0e0e0; }
.acsn-modal-common .modal-content .modal-actions .button { margin-left: 8px; }
.acsn-modal-common .modal-content .feedback-area { margin-top: 15px; font-size: 13px; text-align: left; padding: 10px 12px; border-radius: 3px; display: none; border-left-width: 4px; border-left-style: solid; }
.acsn-modal-common .modal-content .feedback-area.success { background-color: #f0f7f2; color: #155724; border-left-color: #28a745; }
.acsn-modal-common .modal-content .feedback-area.error   { background-color: #fdf3f3; color: #721c24; border-left-color: #d63638; }
.acsn-modal-common .modal-content .feedback-area.working { background-color: #fff8e5; color: #856404; border-left-color: #ffc107; }

/* --- FINE BLOCCO 7 --- */

/* ===================================================================
 * Blocco 8: Notifiche Laboratorio (Polling)
 * =================================================================== */
.lab-controls-area { position: relative; margin-bottom: 20px; min-height: 30px; }
#lab-notifications-area { margin-bottom: 15px; }
.notification-item { background-color: #fff3cd; border: 1px solid #ffeeba; border-left-width: 5px; border-left-color: #ffc107; color: #856404; padding: 10px 40px 10px 15px; margin-bottom: 8px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 0.95em; position: relative; }
.notification-item.notification-new-order    { border-left-color: #0073aa; background-color: #f0f6fc; color: #004085; }
.notification-item.notification-dims-ready   { border-left-color: #46b450; background-color: #f2faf3; color: #1e4c22; }
.notification-item.notification-courier-info { border-left-color: #7e36b1; background-color: #f6f0fa; color: #3c1e4d; }
.notification-item span strong { color: inherit; font-weight: bold; }
.notification-item a.notification-link { color: inherit; text-decoration: underline; }
.notification-item a.notification-link:hover { opacity: 0.8; }
.notification-item .dismiss-notification { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); background: none; border: none; color: inherit; opacity: 0.6; font-size: 20px; font-weight: bold; cursor: pointer; padding: 0 5px; line-height: 1; }
.notification-item .dismiss-notification:hover { opacity: 1; }
.audio-error-message { color: #d63638; font-weight: bold; background-color: #f8d7da; border: 1px solid #f5c6cb; padding: 10px; margin-bottom: 10px; border-radius:3px; }
#lab-toggle-sound-btn { padding: 5px 10px; font-size: 12px; font-weight: bold; line-height: 1.4; min-width: 80px; text-align: center; border: 1px solid; float: right; margin-left: 10px; transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; }
#lab-toggle-sound-btn.sound-active { background-color: #2271b1; border-color: #1f659e; color: white; }
#lab-toggle-sound-btn.sound-active:hover { background-color: #1f659e; border-color: #1a537f; }
#lab-toggle-sound-btn.sound-muted { background-color: #d63638; border-color: #b42b2d; color: white; }
#lab-toggle-sound-btn.sound-muted:hover { background-color: #b42b2d; border-color: #932325; }
#lab-toggle-sound-btn:focus { outline: 1px dotted #555; box-shadow: none; }
#lab-refresh-button-container { clear: both; text-align: center; margin-bottom: 20px; display: none; }
#lab-refresh-button { font-weight: bold; background-color: #d63638; border-color: #b42b2d; }
#lab-refresh-button .dashicons { vertical-align: middle; margin-top: -2px; margin-right: 5px; }

/* --- FINE BLOCCO 8 --- */

/* ===================================================================
 * Blocco 9: Listino Dinamico (Pagina e Shortcode)
 * =================================================================== */
.listino-dinamico-container {}
.listino-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.listino-item { background-color: #f5f5f5; border: 1px solid #ddd; border-radius: 5px; padding: 20px; display: flex; flex-direction: column; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); height: 100%; box-sizing: border-box; }
.listino-item-image { margin-bottom: 15px; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; background-color: #fff; border-radius: 3px; }
.listino-item-image img { width: auto; max-width: 100%; height: auto; max-height: 140px; display: block; }
.listino-item-details { flex-grow: 1; display: flex; flex-direction: column; }
.listino-item-title { font-size: 1.15em; margin-top: 0; margin-bottom: 10px; color: #2c3e50; font-weight: 600; }
.listino-item-description, .listino-item-garanzia { font-size: 0.9em; color: #555c66; margin-bottom: 15px; flex-grow: 1; line-height: 1.4; }
.listino-item-garanzia { font-style: italic; margin-top: 10px; margin-bottom: 10px; }
.listino-item-price { font-size: 1.25em; font-weight: bold; color: #0073aa; margin-top: auto; padding-top: 15px; border-top: 1px solid #e0e0e0; margin-bottom: 0; }
.listino-footer-notes { margin-top: 30px; text-align: center; font-size: 1em; color: #3c434a; }
.listino-footer-notes p { margin-bottom: 5px; }
.listino-footer-notes b { font-weight: 600; }

/* --- FINE BLOCCO 9 --- */

/* ===================================================================
 * Blocco 10: Layout Pagina Laboratorio (Full-Width) - SOLUZIONE CON TEMPLATE
 * =================================================================== */
body.page-template-template-laboratorio .ast-container { max-width: 100% !important; }
body.page-template-template-laboratorio #primary { padding: 2em 25px !important; margin: 0 !important; width: 100% !important; }

/* --- FINE BLOCCO 10 --- */

/* =======================================================
 * Blocco 11: Paginazione e Icone
 * ======================================================= */
.acsn-pagination { margin: 25px 0; text-align: center; clear: both; }
.acsn-pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 2px; border: 1px solid #ddd; background-color: #f9f9f9; color: #0073aa; text-decoration: none; border-radius: 3px; transition: background-color 0.2s, color 0.2s; }
.acsn-pagination .page-numbers:hover { background-color: #e9e9e9; color: #005177; }
.acsn-pagination .page-numbers.current { background-color: #0073aa; border-color: #0073aa; color: #fff; cursor: default; }
.acsn-pagination .page-numbers.dots { border: none; background: none; padding: 8px 4px; }
.button-icon-delete { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: #a0a5aa; padding: 0; margin: 0; background: none; border: none; box-shadow: none; height: auto; line-height: 1; cursor: pointer; }
.button-icon-delete:hover .dashicons { color: #d63638; }
.button-icon-delete .dashicons { font-size: 22px; transition: color 0.2s ease; }

/* --- FINE BLOCCO 11 --- */

/* ================================================
 * Blocco 12: Modale Admin "Ottieni Link Cliente"
 * ================================================*/
.acsn-admin-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 99998; display: none; justify-content: center; align-items: center; }
.acsn-admin-modal-content { background-color: #fff; padding: 25px 30px; border-radius: 5px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); width: 90%; max-width: 550px; z-index: 99999; position: relative; }
.acsn-admin-modal-content h3 { margin-top: 0; margin-bottom: 15px; font-size: 18px; color: #2c3338; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.acsn-admin-modal-link-wrapper { margin-top: 15px; margin-bottom: 20px; }
.acsn-admin-modal-link-input { width: 100%; padding: 8px 10px; font-family: monospace; font-size: 13px; border: 1px solid #ddd; background-color: #f9f9f9; color: #333; box-sizing: border-box; }
.acsn-admin-modal-actions { text-align: right; margin-top: 20px; }
.acsn-admin-modal-copy-btn { background-color: #007cba; color: #fff; border: none; padding: 8px 15px; border-radius: 3px; cursor: pointer; font-size: 14px; transition: background-color 0.2s; }
.acsn-admin-modal-copy-btn:hover { background-color: #005a87; }
.acsn-admin-modal-copy-btn.copied { background-color: #46b450; }
.acsn-admin-modal-close-btn { background-color: #f0f0f1; color: #50575e; border: 1px solid #dcdcde; margin-left: 10px; }
.acsn-admin-modal-close-btn:hover { background-color: #e0e0e1; border-color: #c6c6c7; }

/* --- FINE BLOCCO 12 --- */
