/**
 * Stylesheet for BA Box Product WooCommerce Selection Grid
 * Modificabile liberamente per personalizzare la grafica e l'aspetto estetico.
 */

/* 1. Contenitore Principale del Builder */
.ba-box-builder-container {
/*    margin: 30px 0;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);*/
}

/* 2. Barra di Stato & Avanzamento */
.ba-box-status-bar {
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f3f5;
    line-height: 1.2em;
}
.ba-box-status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ba-box-status-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    text-transform: uppercase;
}
.ba-box-counter {
  font-weight: 400;
  width: 70px;
  text-align: right;
}
.ba-box-progress-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 15px 10px;
    background-color: #fff;
    border-radius: 5px;
    border: 0px dashed #dee2e6;
}
.ba-box-progress-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}
.ba-box-progress-fill {
    height: 100%;
    background-color: var(--highlights-2);
    width: 0%;
    transition: width 0.3s ease;
}
.ba-box-validation-note {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 10px;
    line-height: 1.2em;
    text-align: center;
}
.ba-box-validation-note.text-success {
    color: #ffc107 !important;
       
}
.ba-box-validation-note.text-warning {
    color: #fd7e14 !important; 
    
}

/* 3. Griglia dei Prodotti Consentiti */
.ba-box-products-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 4. Card di Ciascun Prodotto */
.ba-box-item-card {
    border-bottom: solid 1px var(--grigio-chiaro-2);
    border-radius: 0px;
    overflow: hidden;
    background-color: #ffffff;
    display: flex;
    flex-direction: row;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ba-box-item-card:hover {
    border-color: #ced4da;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}
.ba-box-item-card.is-active {
   /* border-color: #0d6efd;
    border-color: var(--grigio-chiaro-2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); */
}
.ba-box-item-card.is-active:before {
content: "✓ nel box";
  position: absolute;
  background-color: var(--highlights-2);
  color: #fff;
  line-height: 1em;
  text-align: center;
  padding: 3px;
  font-size: 11px;
  font-weight: 400;
}

/* Immagine Prodotto */
.ba-box-item-image-wrapper {
    max-width: 100px;
    display: flex;
    align-items: center;
    width:100%;
    min-width: 40px;
}
.ba-box-item-card:hover .ba-box-item-img {
    transform: scale(1.03);
}

/* Dettagli (Titolo e Prezzo) */
.ba-box-item-details {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ba-box-item-title {
    margin-bottom: 3px;
}
.ba-box-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

/* Controlli Quantità (+ / -) */
.ba-box-item-qty-actions {
    display: flex;
    border-top: 1px solid #f1f3f5;
    background-color: #f8f9fa;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
}
.ba-qty-btn {
    border: none;
    background: #ffffff;
    color: #212529;
    font-weight: bold;
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s, opacity 0.2s;
}
.ba-qty-btn:hover:not(:disabled) {
    background-color: #e9ecef;
}
.ba-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.ba-box-item-qty-input {
    width: 35px !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}
.ba-box-item-qty-input::-webkit-outer-spin-button,
.ba-box-item-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 5. Pulsante di Sottomissione e Form */
.ba-box-add-to-cart-form {
    display: flex;
    justify-content: flex-end;
    margin: 0 !important;
}
#ba-box-submit-button {
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
}
#ba-box-submit-button.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #a5a5a5 !important;
    color: #ffffff !important;
}

/* Notice se la Box è vuota */
.ba-box-empty-notice {
    padding: 16px;
    background-color: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    border-radius: 6px;
    line-height: 1.1em;
}

/* 6. Stili per il Calcolo Dinamico dei Prezzi */
.ba-box-total-price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    margin-top: 25px;
}
.ba-box-total-price-label {
    /* font-size: 0.95rem;
    font-weight: 600;
    color: #495057; */
}
.ba-box-total-price-value {
    font-size: 1.5em;
    font-weight: 600;
}
.ba-box-dynamic-price-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    font-style: italic;
}

