/**
 * @see _README_BEFORE_CHANGES.md — Read before making any changes.
 */
/**
 * WooCommerce Business Registration - Modal Styles
 * WordPress-style modal design
 */

/* Overlay */
.wc-br-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 160000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal container */
.wc-br-modal {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    animation: wc-br-modal-slide-in 0.2s ease-out;
}

/* Modal più largo per visualizzazione dati utente */
.wc-br-modal:has(.wc-br-user-info-modal) {
    max-width: 750px;
}

@keyframes wc-br-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.wc-br-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
    background: #f5f5f5;
    border-radius: 4px 4px 0 0;
    position: relative;
}

/* Pulsante X per chiudere */
.wc-br-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s;
    font-weight: 300;
}

.wc-br-modal-close:hover {
    background: #ddd;
    color: #000;
}

.wc-br-modal-close:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

/* Content */
.wc-br-modal-content {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    min-height: 40px;
    position: relative;
}

.wc-br-modal-content p {
    margin: 0 0 10px 0;
}

.wc-br-modal-content ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: disc;
}

.wc-br-modal-content li {
    margin: 4px 0;
}

/* Icon */
.wc-br-modal-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    font-size: 32px;
    line-height: 32px;
    margin-right: 12px;
    vertical-align: middle;
    float: left;
}

.wc-br-modal-icon.dashicons-yes-alt {
    color: #46b450;
}

.wc-br-modal-icon.dashicons-warning {
    color: #dc3232;
}

.wc-br-modal-content p {
    overflow: hidden;
}

/* Footer */
.wc-br-modal-footer {
    padding: 8px 20px;
    text-align: right;
}

.wc-br-modal-footer .button {
    margin-left: 8px;
    padding: 6px 16px;
    min-width: 80px;
}

.wc-br-modal-footer .button:first-child {
    margin-left: 0;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .wc-br-modal {
        width: 95%;
        max-width: none;
    }
    
    .wc-br-modal-header {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .wc-br-modal-content {
        padding: 20px 16px;
    }
    
    .wc-br-modal-footer {
        padding: 10px 16px;
    }
    
    .wc-br-modal-footer .button {
        min-width: auto;
        padding: 6px 12px;
    }
}

/* Stili per confronto vecchi/nuovi valori */
/* Valori differenze - BASE UGUALE per entrambi */
.wc-br-old-value,
.wc-br-new-value {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    display: block;           /* Block invece di inline-block */
    width: 100%;              /* Stessa larghezza */
    box-sizing: border-box;
}

/* Vecchio valore - solo COLORE rosso */
.wc-br-old-value {
    color: #d63638;
    background: #fcf0f1;
}

/* Nuovo valore - solo COLORE verde */
.wc-br-new-value {
    color: #46b450;
    background: #ecf7ed;
}

.wc-br-old-value-small {
    color: #d63638;
    font-size: 13px;
    padding: 4px 8px;
    background: #fcf0f1;
    border-radius: 3px;
}

/* User Info Modal Styles */
.wc-br-user-info-modal {
    font-size: 14px;
    line-height: 1.6;
}

/* Header Utente */
.wc-br-user-header {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.wc-br-user-header h4 {
    margin: 0 0 3px 0 !important;
    color: #2271b1;
    font-size: 16px;
    font-weight: 600;
}

/* Layout 2 Colonne */
.wc-br-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.wc-br-column {
    min-width: 0; /* Previene overflow */
}

.wc-br-column h5 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    color: #2271b1;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

/* Campo dati */
.wc-br-field {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wc-br-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.wc-br-value {
    color: #1d2327;
    font-weight: 500;
    font-size: 14px;
    word-wrap: break-word;
}

/* Campo indirizzo (multi-line) */
.wc-br-field.wc-br-address .wc-br-value div {
    line-height: 1.4;
}

/* Responsive: su schermi piccoli diventa 1 colonna */
@media screen and (max-width: 600px) {
    .wc-br-two-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Vecchi stili info-section (manteniamo per compatibilità) */
.wc-br-info-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.wc-br-info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.wc-br-info-section h4 {
    margin: 0 0 5px 0 !important;
    color: #2271b1;
    font-size: 15px;
    font-weight: 600;
}

.wc-br-info-section p {
    margin: 6px 0;
    color: #50575e;
}

.wc-br-info-section strong {
    color: #1d2327;
    font-weight: 600;
}

/* Diff Item Styles for Modal */
.wc-br-diff-item {
    margin-bottom: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.wc-br-diff-label {
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 8px;
    font-size: 14px;
}

.wc-br-diff-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.wc-br-diff-label-small {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.wc-br-diff-arrow {
    color: #666;
    font-size: 18px;
    font-weight: bold;
}

.wc-br-diff-new {
    text-align: left;
}

/* Stili per le differenze inline (quando non ci sono modifiche) */
.wc-br-no-changes {
    color: #666;
}

/* Container differenza singola */
.wc-br-diff-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Label campo */
.wc-br-diff-field-label {
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Griglia confronto prima/dopo */
.wc-br-diff-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
}

/* Colonna destra (vecchio valore) */
.wc-br-diff-old-column {
    text-align: right;
}

/* Label PRIMA/DOPO */
.wc-br-diff-side-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Valore vecchio (rosso) */
.wc-br-diff-old-value-styled {
    color: #d63638;
    font-size: 14px;
    font-weight: 600;
    padding: 6px;
    background: #fcf0f1;
    border-radius: 3px;
}

/* Freccia centrale */
.wc-br-diff-arrow-big {
    color: #666;
    font-size: 24px;
    font-weight: bold;
}

/* Valore nuovo (verde) */
.wc-br-diff-new-value-styled {
    color: #46b450;
    font-size: 14px;
    font-weight: 600;
    padding: 6px;
    background: #ecf7ed;
    border-radius: 3px;
}

/* Info notice nel modal (molto evidente) */
.wc-br-info-notice {
    background: #fff3cd;
    border: 2px solid #ff9800;
    border-radius: 4px;
    padding: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.wc-br-info-notice p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.wc-br-info-notice strong {
    color: #e65100;
    font-size: 15px;
}

/* Stili per contenuto modal conferma/alert */
.wc-br-modal-badge {
    margin-bottom: 12px;
    color: #2271b1;
}

.wc-br-modal-text-main {
    font-size: 15px;
    margin: 0 0 10px 0;
}

.wc-br-modal-text-secondary {
    color: #666;
    font-size: 13px;
    margin: 0;
}


.wc-br-user-email {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 13px;
}

/* Status box nel modal con colori dinamici */
.wc-br-status-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2271b1;
}

.wc-br-status-box {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    border-left: 4px solid;
}

.wc-br-status-value {
    font-size: 13px;
    margin-bottom: 4px;
}

.wc-br-status-desc {
    font-size: 12px;
    line-height: 1.4;
}

/* Colori per status incomplete */
.wc-br-status-incomplete {
    background: #f0f0f0;
    color: #666;
    border-left-color: #999;
}

/* Colori per status pending_verification */
.wc-br-status-pending_verification {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

/* Colori per status unlocked */
.wc-br-status-unlocked {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Colori per status active */
.wc-br-status-active {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}
