/* Stili base già in bg-unified.css - rimossi duplicati */

/* Stili tabelle report già in bg-unified.css - rimossi duplicati */

/* Stili completed/failed righe tabelle già in bg-unified.css - rimossi duplicati */

.bg-sales-report th.bg-paid {
    text-align: right;
}

.bg-sales-report td.bg-paid {
    text-align: right;
}

.bg-sales-report td.bg-post {
    text-align: right;
}

.bg-sales-report td.bg-owed {
    text-align: right;
}

.bg-sales-report td.bg-price {
    text-align: right;
}

.bg-price {
    max-width: 85px;
    width: 85px;
}

.bg-paid {
    min-width: 110px;
    width: auto;
}

.bg-purchaser {
    width: 200px;
    max-width: 200px;
}

.bg-sales-report caption {
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1.5;
    margin-top: 2em;
}

.bg-sales-report thead th {
    background: #e9e9e9;
    text-align: center !important;
}

.bg-sales-report .bg-tickets {
    text-align: left;
    width: 70px;
    line-height: 1.2;
}

.bg-sales-report .bg-n_tickets {
    width: 50px;
    max-width: 50px;
    text-align: center;
}

.bg-sales-report .bg-status {
    width: 55px;
}

.bg-sales-report th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 20px !important;
    text-align: center !important;
}

.bg-sales-report th.sortable:after {
    content: '⇕';
    position: absolute;
    right: 5px;
    color: #999;
}

.bg-sales-report th.sorting-asc:after {
    content: '↑';
    color: #333;
}

.bg-sales-report th.sorting-desc:after {
    content: '↓';
    color: #333;
}

.bg-sales-report tr.alternate {
    background-color: #f9f9f9;
}

.bg-sales-report tr.even {
    background-color: #ffffff;
}

.bg-sales-report tr.bg-report-row.even {
    background-color: #f9f9f9;
}

.bg-sales-report tr.bg-report-row.odd {
    background-color: #ffffff;
}

.bg-sales-report tr.bg-report-row:hover {
    background-color: #f5f5f5;
}

.bg-sales-report .bg-type br + * {
    margin-top: 3px;
}

.bg-sales-report .bg-type .bg-money-format {
    color: #666;
    font-size: 0.95em;
}

/* .tablenav e .tablenav-pages già in bg-unified.css */

.bg-summary-value strong {
    color: #000;
    font-size: 16px;
    font-weight: 600;
}

/* .bg-filter-available, .bg-settings-section, .mt, .pending già in bg-unified.css */

/* .sortable-table, .table-container, .bg_sandbox_enabled, .extra-info-item, notice.e-notice già in bg-unified.css */

#sm_levels_settings {
    box-sizing: border-box;
}

#sm_levels_settings * {
    box-sizing: border-box;
}

#sm_levels_settings .postbox {
    position: static !important;
    z-index: 1;
    margin-bottom: 20px;
    background: transparent !important;
}

#sm_levels_settings .postbox.closed {
    overflow: visible;
}

#sm_levels_settings .postbox .inside {
    overflow: visible !important;
}

#sm_levels_settings .postbox .hndle {
    cursor: pointer;
}

#sm_levels_settings .form-table th {
    width: 200px;
}

#sm_levels_settings .level-row {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#sm_levels_settings .level-row:nth-child(even) {
    background: #fff;
}

#sm_levels_settings .level-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

#sm_levels_settings .level-name {
    font-weight: 600;
    font-size: 14px;
}

#sm_levels_settings .level-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

#sm_levels_settings input[type="number"] {
    max-width: 200px;
    width: 100%;
}

#sm_levels_settings input[type="text"] {
    max-width: 200px;
    width: 100%;
}

.sm-yearly-settings {
    width: 100%;
}

.sm-yearly-settings .form-table th {
    width: 200px;
}

.sm-yearly-settings textarea {
    width: 100%;
    min-height: 500px;
    font-family: monospace;
    font-size: 13px;
}

.sm-yearly-settings input[type="text"] {
    width: 100%;
}

.sm-info-box {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 20px 0;
}

.sm-info-box h4 {
    margin-top: 0;
}

.sm-info-box code {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
}

.sm-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sm-buttons .button-secondary {
    background: #f0f0f1;
}

.sm-buttons .button-warning {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.sm-buttons .button-warning:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

#sm_levels_settings .postbox > .inside {
    background: #fff;
}

#sm_levels_settings .sm-level-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    margin-bottom: 15px;
    position: static !important;
}

.biglietteria-levels .sm-level-box .hndle {
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid #ccd0d4;
    background: #f5f5f5;
    cursor: default;
}

.biglietteria-levels .sm-level-name-preview {
    font-weight: normal;
    color: #666;
}

.biglietteria-levels .sm-level-table {
    margin: 0;
}

.biglietteria-levels .sm-level-table th {
    width: 150px;
    padding: 15px 10px;
}

.biglietteria-levels .sm-level-table td {
    padding: 15px 10px;
}

.biglietteria-levels .inside {
    padding: 0 15px 15px;
    margin: 0;
}

.biglietteria-levels .postbox > .inside {
    padding-top: 15px;
}

.biglietteria-levels .sm-level-box .inside {
    padding: 0;
}

/* =====================================================================
   POPUP DESTINATARI BIGLIETTI (Metabox Evento)
   ===================================================================== */
.bg-label-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bg-recipients-btn {
    padding: 0 6px !important;
    min-width: 30px;
}

.bg-recipients-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.bg-recipients-tags {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.bg-recipients-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    display: none;
}

.bg-recipients-popup.visible {
    display: flex;
}

.bg-recipients-popup-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 350px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.bg-recipients-popup-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bg-recipients-popup-header h4 {
    margin: 0;
}

.bg-recipients-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.bg-recipients-popup-body {
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bg-recipient-option {
    display: flex !important;
    align-items: center;
    padding: 14px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.bg-recipient-option:hover {
    background: #e8f4fc;
    border-color: #0073aa;
}

.bg-recipient-option input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bg-recipient-option input:checked + span,
.bg-recipient-option:has(input:checked) {
    font-weight: 600;
    color: #0073aa;
}

.bg-recipients-popup-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
