/*
 * WC Preventivo – Frontend Styles
 * Compatibile con i temi WooCommerce standard
 */

/* ============================================================
   VARIABILI CSS
   ============================================================ */
:root {
  --wcp-primary:      #a34055;
  --wcp-primary-dark: #933a4d;
  --wcp-primary-light:#f4f8ff;
  --wcp-success:      #10b981;
  --wcp-danger:       #ef4444;
  --wcp-warning:      #f59e0b;
  --wcp-gray-50:      #f9fafb;
  --wcp-gray-100:     #f3f4f6;
  --wcp-gray-200:     #e5e7eb;
  --wcp-gray-400:     #9ca3af;
  --wcp-gray-600:     #4b5563;
  --wcp-gray-900:     #111827;
  --wcp-radius:       0px;
  --wcp-shadow:       0 2px 12px rgba(0,0,0,.08);
  --wcp-transition:   .2s ease;
}

/* ============================================================
   PULSANTE "AGGIUNGI AL PREVENTIVO"
   ============================================================ */
.wcp-add-btn {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      var(--wcp-primary);
  color:           #fff;
  border:          none;
  border-radius:   var(--wcp-radius);
  padding:         11px 20px;
  font-size:       14px;
  font-weight:     600;
  cursor:          pointer;
  transition:      background var(--wcp-transition), transform var(--wcp-transition), box-shadow var(--wcp-transition);
  text-decoration: none;
  line-height:     1;
  white-space:     nowrap;
}
.wcp-add-btn:hover {
  background:   var(--wcp-primary-dark);
  /*transform:    translateY(-1px);*/
  box-shadow:   0 4px 16px rgba(37,99,235,.3);
  color:        #fff;
}
.wcp-add-btn:active {
  transform:  translateY(0);
}
.wcp-add-btn.wcp-added {
  background: var(--wcp-success);
}
.wcp-add-btn .wcp-btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* Loop context */
.wcp-context-loop {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* ============================================================
   SINGOLO PRODOTTO – WRAPPER
   ============================================================ */
.wcp-single-add-wrap {
  margin-top: 20px;
}
.wcp-qty-wrap {
  margin-bottom: 14px;
}
.wcp-qty-wrap label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--wcp-gray-600);
}
.wcp-qty-controls {
  display:     inline-flex;
  align-items: center;
  border:      1px solid var(--wcp-gray-200);
  border-radius: var(--wcp-radius);
  overflow:    hidden;
}
.wcp-qty-btn {
  background:  var(--wcp-gray-100);
  border:      none;
  padding: 9px 14px;
  font-size: 21px;
  cursor:      pointer;
  color:       var(--wcp-gray-600);
  transition:  background var(--wcp-transition);
  line-height: 1;
}
.wcp-qty-btn:hover {
  background: var(--wcp-gray-200);
}
.wcp-qty-input {
  width:       60px;
  text-align:  center;
  border:      none;
  border-left: 1px solid var(--wcp-gray-200);
  border-right:1px solid var(--wcp-gray-200);
  padding:     8px 4px 9px 4px;
  font-size:   15px;
  font-weight: 600;
  appearance:      textfield;
  -moz-appearance: textfield;
  margin-top: 0px !important;
  border-radius: 0px;
}
.wcp-qty-input::-webkit-outer-spin-button,
.wcp-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin:0; }

.wcp-view-link {
  display:        inline-block;
  margin-top:     10px;
  font-size:      13px;
  color:          var(--wcp-primary);
  text-decoration:underline;
}

/* ============================================================
   PAGINA PREVENTIVO – LAYOUT
   ============================================================ */
.wcp-preventivo-wrap {
  max-width: 1200px;
  margin:    0 auto;
  padding:   20px 0 40px;
}

.wcp-preventivo-layout .wcp-products-col{
  margin-bottom: 20px !important;
}

/*.wcp-preventivo-layout {
  display:  grid;
  grid-template-columns: 1fr 420px;
  gap:      32px;
  align-items: start;
}

@media (max-width: 900px) {
  .wcp-preventivo-layout { grid-template-columns: 1fr; }
}
*/


/* Empty state */
.wcp-empty-state {
  text-align:  center;
  padding:     60px 20px;
}
.wcp-empty-icon {
  font-size:   64px;
  margin-bottom: 16px;
}
.wcp-empty-state h2 {
  font-size:   22px;
  margin-bottom: 8px;
}
.wcp-empty-state p {
  color:       var(--wcp-gray-600);
  margin-bottom: 24px;
}

/* Section title */
.wcp-section-title {
  display:       flex;
  align-items:   center;
  gap:           8px;
  font-size:     18px;
  font-weight:   700;
  color:         var(--wcp-gray-900);
  margin:        0 0 20px;
  padding-bottom:12px;
  border-bottom: 2px solid var(--wcp-gray-200);
}
.wcp-title-icon { font-size: 20px; }

/* ============================================================
   TABELLA ARTICOLI
   ============================================================ */
.wcp-items-table-wrap {
  overflow-x: auto;
  border-radius: var(--wcp-radius);
  border: 1px solid var(--wcp-gray-200);
}
.wcp-items-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       14px;
  margin-top: 0px !important;
}
.wcp-items-table thead tr {
  background: var(--wcp-gray-50);
}
.wcp-items-table th {
  padding:    12px 16px;
  text-align: left;
  font-size:  12px;
  font-weight:600;
  color:      var(--wcp-gray-600);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--wcp-gray-200);
}
.wcp-items-table td {
  padding:     14px 16px;
  border-bottom: 1px solid var(--wcp-gray-100);
  vertical-align: middle;
}
.wcp-item-row:last-child td { border-bottom: none; }
.wcp-item-row:hover td { background: var(--wcp-gray-50); }

.wcp-product-cell {
  display:     flex;
  align-items: flex-start;
  gap:         14px;
}
.wcp-item-thumb img,
.wcp-item-thumb .wcp-item-img {
  width: 80px;
  height: 80px;
  object-fit:    cover;
  border-radius: 0px; /*Era 8*/
  z-index: 2;
  position: relative;
}
.wcp-item-name {
  font-weight:     600;
  color:           var(--wcp-primary) !important;
  text-decoration: none;
  font-size: 17px !important;
}

.wcp-item-name:hover { color: var(--wcp-primary-dark) !important; }
.wcp-item-meta {
  list-style: none;
  margin:     4px 0 0;
  padding:    0;
  font-size:  12px;
  color:      var(--wcp-gray-600);
  padding-left: 0px !important;
}
.wcp-item-meta li { 
  margin-bottom: 2px;
  font-size: 13px;
}

.wcp-item-meta li { 
  font-weight: 200 !important;
}


.wcp-item-meta li::marker { 
  color: #fff !important; 
  z-index: 1;
  position: relative;
}

.wcp-col-qty  { width: 140px; text-align: center !important; }
.wcp-col-actions { width: 60px; text-align: center !important; }

/*
 * Mobile: la tabella diventa una singola colonna, con prodotto e
 * quantità impilati uno sotto l'altro invece che affiancati e schiacciati.
 */
@media (max-width: 600px) {
  .wcp-items-table,
  .wcp-items-table thead,
  .wcp-items-table tbody,
  .wcp-items-table tr,
  .wcp-items-table th,
  .wcp-items-table td {
    display: block;
    width: 100%;
  }
  .wcp-items-table thead {
    display: none;
  }
  .wcp-item-row {
    padding: 16px 0;
    border-bottom: 1px solid var(--wcp-gray-200);
  }
  .wcp-item-row:last-child { border-bottom: none; }
  .wcp-items-table td {
    padding: 0;
    border-bottom: none;
    width: auto;
    text-align: left;
  }
  .wcp-col-product,
  .wcp-col-qty,
  .wcp-col-actions {
    padding-left:  20px !important;
    padding-right: 20px !important;
  }
  .wcp-col-product { margin-bottom: 14px; }
  .wcp-product-cell { flex-direction: column; }
  .wcp-col-qty { margin-bottom: 12px; text-align: center !important; }
  .wcp-col-qty::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--wcp-gray-600);
    margin-bottom: 6px;
  }
  .wcp-col-actions { text-align: center !important; }
}

/* Rimuovi */
.wcp-remove-btn {
  background:  none;
  border:      none;
  color:       var(--wcp-gray-400);
  font-size:   16px;
  cursor:      pointer;
  transition:  color var(--wcp-transition);
  padding:     4px 8px;
  border-radius: 0px; /*Era 4*/
}
.wcp-remove-btn:hover { color: var(--wcp-danger); background: #fef2f2; }

/* Pulisci tutto */
.wcp-clear-btn{
  padding: 10px 16px;
  background-color: var(--wcp-danger) !important;
}

/* Azioni tabella */
.wcp-table-actions {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-top:      16px;
  flex-wrap:       wrap;
  gap:             10px;
}

/* ============================================================
   BOTTONI GENERALI
   ============================================================ */
.wcp-btn-primary {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      var(--wcp-primary);
  color:           #fff !important;
  border:          none;
  border-radius:   var(--wcp-radius);
  padding:         12px 28px;
  font-size:       15px;
  font-weight:     700;
  cursor:          pointer;
  text-decoration: none;
  transition:      background var(--wcp-transition), transform var(--wcp-transition), box-shadow var(--wcp-transition);
}
.wcp-btn-primary:hover {
  background:  var(--wcp-primary-dark);
  /*transform:    translateY(-1px);*/
  box-shadow:  0 4px 16px rgba(37,99,235,.3);
}
.wcp-btn-outline {
  display:         inline-flex;
  align-items:     center;
  gap:             6px;
  background:      transparent;
  border:          2px solid var(--wcp-gray-200);
  color:           var(--wcp-gray-600) !important;
  border-radius:   var(--wcp-radius);
  padding:         10px 20px;
  font-size:       14px;
  font-weight:     600;
  cursor:          pointer;
  text-decoration: none;
  transition:      border-color var(--wcp-transition), color var(--wcp-transition);
}
.wcp-btn-outline:hover { border-color: var(--wcp-primary); color: var(--wcp-primary) !important; }
.wcp-btn-text {
  /*background-color: var(--violetto);*/
  border:      none;
  color:       white;
  font-size:   13px;
  cursor:      pointer;
  padding:     0;
  font-weight: 600;
  padding: 8px 9px;
}
.wcp-btn-text:hover { text-decoration: underline; }

/* ============================================================
   FORM CONTATTI
   ============================================================ */
.wcp-form-wrap {
  background:    #fff;
  border:        1px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 14*/
  padding:       28px;
  box-shadow:    var(--wcp-shadow);
  position:      sticky;
  top:           20px;
}
.wcp-form-row { margin-bottom: 18px; }
.wcp-form-row:last-child { margin-bottom: 0; }
.wcp-row-2 {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   16px;
}
@media (max-width: 500px) {
  .wcp-row-2 { grid-template-columns: 1fr; }
}
.wcp-field label {
  display:       block;
  margin-bottom: 6px;
  font-size:     13px;
  font-weight:   600;
  color:         var(--wcp-gray-600);
}
.wcp-required { color: var(--wcp-danger); }
.wcp-field input[type=text],
.wcp-field input[type=email],
.wcp-field input[type=tel],
.wcp-field select,
.wcp-field textarea {
  width:         100%;
  padding:       10px 14px;
  border:        1.5px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 8*/
  font-size:     14px;
  color:         var(--wcp-gray-900);
  background:    #fff;
  transition:    border-color var(--wcp-transition), box-shadow var(--wcp-transition);
  box-sizing:    border-box;
  appearance:    none;
  -webkit-appearance: none;
}
.wcp-field input:focus,
.wcp-field select:focus,
.wcp-field textarea:focus {
  outline:      none;
  border-color: var(--wcp-primary);
  box-shadow:   0 0 0 3px rgba(37,99,235,.1);
}
.wcp-field input.wcp-error,
.wcp-field select.wcp-error,
.wcp-field textarea.wcp-error {
  border-color: var(--wcp-danger);
}
.wcp-field textarea { resize: vertical; }

/* GDPR */
.wcp-gdpr-row { border-radius: 0px; /*Era 8*/ padding: 14px; padding-left: 0px;}
.wcp-checkbox-label {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  cursor:      pointer;
}
.wcp-checkbox-label input[type=checkbox] { display: none; }
.wcp-checkbox-custom {
  width:         20px;
  height:        20px;
  min-width:     20px;
  border:        2px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 5*/
  background:    #fff;
  margin-top:    1px;
  transition:    all var(--wcp-transition);
  position:      relative;
}
.wcp-checkbox-label input:checked ~ .wcp-checkbox-custom {
  background:    var(--wcp-primary);
  border-color:  var(--wcp-primary);
}
.wcp-checkbox-label input:checked ~ .wcp-checkbox-custom::after {
  content:   '';
  position:  absolute;
  left:      5px; top: 2px;
  width:     6px; height: 10px;
  border:    2px solid #fff;
  border-top:   none;
  border-left:  none;
  transform: rotate(45deg);
}
.wcp-gdpr-text {
  font-size:   13px;
  line-height: 1.5;
  color:       var(--wcp-gray-600);
}
.wcp-gdpr-text a { color: var(--wcp-primary); }

/* Submit */
.wcp-submit-row { margin-top: 6px; }
.wcp-submit-btn {
  width:      100%;
  justify-content: center;
  font-size:  16px;
  background:      var(--wcp-primary) !important;
  color:           #fff;
  border:          none;
  border-radius:   var(--wcp-radius);
  padding:         11px 20px;
}
.wcp-submit-btn:disabled {
  opacity: .7;
  cursor:  not-allowed;
  transform: none;
}

/* Spinner */
.wcp-spinner {
  display:       inline-block;
  width:         16px;
  height:        16px;
  border:        2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation:     wcp-spin .7s linear infinite;
}
@keyframes wcp-spin { to { transform: rotate(360deg); } }

/* Messages */
.wcp-messages {
  margin-top:    16px;
  padding:       14px 16px;
  border-radius: 0px; /*Era 8*/
  font-size:     14px;
  line-height:   1.5;
}
.wcp-messages.wcp-success {
  background: #f0fdf4;
  border:     1px solid #bbf7d0;
  color:      #166534;
}
.wcp-messages.wcp-error {
  background: #fef2f2;
  border:     1px solid #fecaca;
  color:      #991b1b;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
#wcp-toast {
  position:      fixed;
  bottom:        24px;
  right:         24px;
  background:    #1f2937;
  color:         #fff;
  padding:       14px 20px;
  border-radius: 0px; /*Era 10*/
  font-size:     14px;
  font-weight:   600;
  box-shadow:    0 8px 24px rgba(0,0,0,.2);
  z-index:       9999;
  display:       flex;
  align-items:   center;
  gap:           10px;
  max-width:     320px;
  transform:     translateY(20px);
  opacity:       0;
  transition:    transform .3s ease, opacity .3s ease;
  pointer-events:none;
}
#wcp-toast.wcp-toast-show {
  transform: translateY(0);
  opacity:   1;
  pointer-events: auto;
}
#wcp-toast .wcp-toast-link {
  color:          #93c5fd;
  font-weight:    600;
  text-decoration:none;
  white-space:    nowrap;
}
#wcp-toast .wcp-toast-link:hover { text-decoration: underline; }

/* ============================================================
   MINI COUNTER (opzionale, nel menu/header)
   ============================================================ */
.wcp-counter {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-width:       20px;
  height:          20px;
  background:      var(--wcp-primary);
  color:           #fff;
  font-size:       11px;
  font-weight:     700;
  border-radius:   0px; /*Era 10*/
  padding:         0 5px;
  vertical-align:  middle;
  line-height:     1;
}

/* ============================================================
   SINGOLO PRODOTTO – INTEGRAZIONE CON FORM VARIANTI WC
   ============================================================ */

/*
 * Nasconde il pulsante "Aggiungi al carrello" nativo di WooCommerce.
 * Il nostro .wcp-add-btn viene iniettato al suo posto via JS.
 */
.single-product .single_add_to_cart_button {
  display: none !important;
}

/*
 * Nasconde il prezzo sulla pagina singolo prodotto
 * (alcuni temi lo mostrano fuori dal blocco summary standard).
 */
.single-product .price,
.single-product p.price,
.single-product span.price,
.single-product .woocommerce-Price-amount {
  display: none !important;
}

/*
 * Wrapper che avvolge il pulsante nell'area del form.
 * Garantisce allineamento coerente con il form varianti.
 */
.wcp-button-area {
  margin-top: 16px;
}
.wcp-button-area .wcp-add-btn {
  min-width: 200px;
}

/*
 * Link "Vedi preventivo" che compare dopo l'aggiunta.
 */
.wcp-view-link {
  display:         none;
  margin-top:      10px;
  font-size:       13px;
  color:           var(--wcp-primary);
  text-decoration: underline;
  cursor:          pointer;
}

/*
 * Stile form varianti WC (tabella attributi).
 * Rende il selettore coerente con l'estetica del plugin.
 */
.single-product .variations_form .variations td,
.single-product .variations_form .variations th {
  padding: 8px 0;
  vertical-align: middle;
}
.single-product .variations_form .variations th label {
  font-weight: 600;
  font-size:   14px;
  color:       var(--wcp-gray-600);
}
.single-product .variations_form select {
  padding:       10px 14px;
  border:        1.5px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 8*/
  font-size:     14px;
  color:         var(--wcp-gray-900);
  background:    #fff;
  min-width:     180px;
  appearance:    none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:   no-repeat;
  background-position: right 12px center;
  padding-right:       36px;
  transition: border-color .2s, box-shadow .2s;
}
.single-product .variations_form select:focus {
  outline:      none;
  border-color: var(--wcp-primary);
  box-shadow:   0 0 0 3px rgba(37,99,235,.1);
}

/* Link "Cancella selezione" di WC */
.single-product .reset_variations {
  font-size:       12px;
  color:           var(--wcp-gray-400);
  text-decoration: none;
  margin-left:     8px;
}
.single-product .reset_variations:hover {
  color: var(--wcp-danger);
  text-decoration: underline;
}

/* Messaggio "Questa variante non è disponibile" */
.single-product .woocommerce-variation-availability,
.single-product .woocommerce-variation-description {
  font-size:  13px;
  color:      var(--wcp-gray-600);
  margin-top: 8px;
}

/* ============================================================
   PERSONALIZZAZIONI – PANNELLO SINGOLO PRODOTTO
   ============================================================ */
.wcp-personalizzazioni,
.wcp-quantita{
  margin-top:    24px;
  border-top:    2px solid var(--wcp-gray-200);
  padding-top:   20px;
}
.wcp-pers-heading {
  font-size:     15px;
  font-weight:   700;
  color:         var(--wcp-gray-900);
  margin:        0 0 14px;
  letter-spacing:.2px;
}

/* Singola voce */
.wcp-pers-item {
  border:        1.5px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 10*/
  margin-bottom: 10px;
  overflow:      hidden;
  transition:    border-color var(--wcp-transition);
}
.wcp-pers-item:has(.wcp-pers-check:checked) {
  border-color:  var(--wcp-primary);
}

/* Riga toggle */
.wcp-pers-toggle {
  display:       flex;
  align-items:   center;
  gap:           12px;
  padding:       14px 16px;
  cursor:        pointer;
  user-select:   none;
  margin-bottom: 0px;
}
.wcp-pers-toggle:hover { background: var(--wcp-gray-50); }

/* Checkbox custom */
.wcp-pers-check {
  position: absolute !important;
  opacity:  0 !important;
  width:    0 !important;
  height:   0 !important;
}
.wcp-pers-check-box {
  width:         20px;
  height:        20px;
  min-width:     20px;
  border:        2px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 5*/
  background:    #fff;
  position:      relative;
  transition:    all var(--wcp-transition);
}
.wcp-pers-check:checked ~ .wcp-pers-check-box {
  background:   var(--wcp-primary);
  border-color: var(--wcp-primary);
}
.wcp-pers-check:checked ~ .wcp-pers-check-box::after {
  content:   '';
  position:  absolute;
  left: 5px; top: 2px;
  width: 6px; height: 10px;
  border:      2px solid #fff;
  border-top:  none;
  border-left: none;
  transform:   rotate(45deg);
}

/* Label wrap */
.wcp-pers-label-wrap {
  display:     flex;
  align-items: center;
  gap:         10px;
}
.wcp-pers-icon     { display: flex; align-items: center; flex-shrink: 0; }
.wcp-pers-icon svg { display: block; color:var(--wcp-primary)}
.wcp-pers-label-inner {
  display:        flex;
  flex-direction: column;
  gap:            2px;
}
.wcp-pers-label-title {
  font-size:   14px;
  font-weight: 700;
  color:       var(--wcp-gray-900);
  line-height: 1.2;
}
.wcp-pers-label-desc {
  font-size:   12px;
  color:       var(--wcp-gray-600);
  line-height: 1.4;
}

/* Pannello a scomparsa */
.wcp-pers-panel {
  display:    none;
  border-top: 1px solid var(--wcp-gray-200);
  background: var(--wcp-gray-50);
}
.wcp-pers-fields {
  padding:    16px;
  display:    flex;
  flex-direction: column;
  gap:        14px;
}
.wcp-pers-field > label {
  display:       block;
  font-size:     13px;
  font-weight:   600;
  color:         var(--wcp-gray-600);
  margin-bottom: 6px;
}
.wcp-pers-hint {
  font-weight: 400;
  color:       var(--wcp-gray-400);
}
.wcp-pers-input {
  width:         100%;
  padding:       9px 12px;
  border:        1.5px solid var(--wcp-gray-200);
  border-radius: 0px; /*Era 8*/
  font-size:     14px;
  color:         var(--wcp-gray-900);
  background:    #fff;
  box-sizing:    border-box;
  transition:    border-color var(--wcp-transition), box-shadow var(--wcp-transition);
  appearance:    none;
  -webkit-appearance: none;
}
.wcp-pers-input:focus {
  outline:      none;
  border-color: var(--wcp-primary);
  box-shadow:   0 0 0 3px rgba(37,99,235,.1);
}
.wcp-pers-input[type="textarea"],
textarea.wcp-pers-input { resize: vertical; }

/* Counter caratteri */
.wcp-counter-wrap {
  position: relative;
}
.wcp-counter-wrap .wcp-pers-input {
  padding-right: 52px;
}
.wcp-char-counter {
  position:  absolute;
  right:     10px;
  top:       50%;
  transform: translateY(-50%);
  font-size: 11px;
  color:     var(--wcp-gray-400);
  pointer-events: none;
}

/* Color swatches */
.wcp-color-swatches {
  display:   flex;
  flex-wrap: wrap;
  gap:       10px;
}
.wcp-color-swatch {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            4px;
  cursor:         pointer;
}
.wcp-color-swatch input[type="radio"] {
  position: absolute;
  opacity:  0;
  width:    0;
  height:   0;
}
.wcp-swatch-dot {
  width:         30px;
  height:        30px;
  border-radius: 0px; /*Era 50%*/
  border:        2px solid rgba(0,0,0,.1);
  transition:    transform .15s, box-shadow .15s;
}
.wcp-swatch-light { border: 2px solid var(--wcp-gray-200); }
.wcp-color-swatch:has(input:checked) .wcp-swatch-dot {
  box-shadow: 0 0 0 3px var(--wcp-primary);
  transform:  scale(1.18);
}
.wcp-swatch-label {
  font-size:   10px;
  color:       var(--wcp-gray-600);
  white-space: nowrap;
}

/* Upload file */
.wcp-file-wrap {
  display:     flex;
  align-items: center;
  gap:         10px;
  flex-wrap:   wrap;
}
.wcp-file-native {
  position: absolute;
  opacity:  0;
  width:    0;
  height:   0;
}
.wcp-file-btn {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       8px 14px;
  background:    #fff;
  border:        1.5px dashed var(--wcp-gray-400);
  border-radius: 0px; /*Era 8*/
  cursor:        pointer;
  font-size:     13px;
  font-weight:   600;
  color:         var(--wcp-gray-600);
  transition:    all var(--wcp-transition);
  white-space:   nowrap;
}
.wcp-file-btn:hover {
  background:   var(--wcp-primary-light);
  border-color: var(--wcp-primary);
  color:        var(--wcp-primary);
}
.wcp-file-feedback {
  font-size: 12px;
  flex:      1;
}
.wcp-file-ok    { color: var(--wcp-success); font-weight: 600; }
.wcp-file-error { color: var(--wcp-danger);  font-weight: 600; }
.wcp-file-loading { color: var(--wcp-gray-400); }

/* ============================================================
   SHORTCODE [mp-disclaimer-personalizzazione]
   ============================================================ */
.mp-disclaimer-personalizzazione {
  display:       flex;
  align-items:   flex-start;
  gap:           10px;
  padding:       14px 16px;
  background:    var(--wcp-primary-light);
  border-left:   3px solid var(--wcp-primary);
  border-radius: 0px;
  margin:        16px 0;
}
.mp-disclaimer-icon {
  flex-shrink:   0;
  margin-top:    2px;
  color:         var(--wcp-primary);
}
.mp-disclaimer-personalizzazione p {
    margin: 0;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.6;
    color: #000000;
}

/* Badge personalizzazioni nella pagina preventivo */
.wcp-item-pers {
  list-style: none;
  margin:     6px 0 0;
  padding:    0;
  display:    flex;
  flex-wrap:  wrap;
  gap:        4px;
  padding-left: 0px !important;
}
.wcp-item-pers-badge {
  display:       inline-block;
  padding:       2px 8px;
  background:    var(--wcp-primary-light);
  color:         var(--wcp-primary);
  border-radius: 0px; /*Era 4*/
  font-size:     11px;
  font-weight:   600;
}

/* ============================================================
   SELEZIONE TIPOLOGIA SPEDIZIONE
   ============================================================ */
.wcp-shipping-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   12px;
  margin-top:            8px;
}
@media (max-width: 540px) {
  .wcp-shipping-grid { grid-template-columns: 1fr; }
}
.wcp-shipping-card {
  cursor:        pointer;
  display:       block;
  border-radius: 0px; /*Era 10*/
  border:        2px solid var(--wcp-gray-200);
  transition:    border-color var(--wcp-transition), background var(--wcp-transition), box-shadow var(--wcp-transition);
}
.wcp-shipping-card:hover {
  border-color: var(--wcp-primary);
  box-shadow:   0 2px 8px rgba(37,99,235,.1);
}
.wcp-shipping-card input[type="radio"],
.wcp-shipping-card input[type="checkbox"] {
  position: absolute;
  opacity:  0;
  width:    0;
  height:   0;
}
.wcp-shipping-card:has(input:checked) {
  border-color: var(--wcp-primary);
  /*background:   var(--wcp-primary-light)*/;
  box-shadow:   0 2px 10px rgba(37,99,235,.15);
  position: relative;
}
.wcp-shipping-card:has(input:checked):after{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: var(--wcp-primary);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.wcp-shipping-grid.wcp-error .wcp-shipping-card {
  border-color: var(--wcp-danger);
}
.wcp-shipping-grid.wcp-error .wcp-shipping-card:has(input:checked) {
  border-color: var(--wcp-primary);
}
.wcp-shipping-card-inner {
  display:        flex;
  flex-direction: column;
  gap:            4px;
  padding:        14px 16px;
  pointer-events: none;
}
.wcp-shipping-icon {
  font-size:     22px;
  line-height:   1;
  margin-bottom: 2px;
}
.wcp-shipping-title {
  font-size:   14px;
  font-weight: 700;
  color:       var(--wcp-gray-900);
  line-height: 1.3;
}
.wcp-shipping-desc {
  font-size:   12px;
  color:       var(--wcp-gray-600);
  line-height: 1.5;
}

/* ============================================================
   ICONA PREVENTIVO NEL MENU
   ============================================================ */
.wcp-menu-icon-item > a,
a.wcp-menu-icon-link {
  position:    relative !important;
  display:     inline-flex !important;
  align-items: center;
  padding:     4px 6px !important;
  line-height: 1;
  height: 28px !important;
}
.wcp-menu-icon-link svg {
  display: block;
  width:   22px;
  height:  22px;
}
.wcp-menu-badge {
  position:    absolute !important;
  top: -6px !important;
  right: -13px !important;
  min-width: 11px !important;
  height:      18px !important;
  background:  var(--wcp-danger) !important;
  font-size:   10px !important;
  font-weight: 700 !important;
  border-radius: 0px !important; /*Era 9*/
  padding:     0 4px !important;
  line-height: 18px !important;
  text-align:  center !important;
  display:     inline-block !important;
  vertical-align: unset !important;
  border:      2px solid #fff;
}

/*
 * L'icona preventivo del menu "cta" viene ristampata anche dentro il menu
 * dropdown/accordion mobile di Uncode. Non la vogliamo lì: viene mostrata
 * invece accanto al pulsante hamburger (vedi .wcp-mobile-icon-link sotto).
 */
.navbar-accordion-cta .wcp-menu-icon-item {
  display: none !important;
}

/* ============================================================
   ICONA PREVENTIVO NELLA BARRA MOBILE (accanto all'hamburger)
   ============================================================ */
/*
 * Nascosta finché il JS non la sposta dentro .mobile-additional-icons:
 * lasciata al suo posto originale (subito prima del pulsante hamburger)
 * romperebbe il calcolo a larghezza fissa che Uncode usa per posizionare
 * quella riga di icone.
 */
#wcp-mobile-menu-icon {
  display: none;
}
.wcp-mobile-icon-link .wcp-icon-container {
  position:    relative;
  display:     inline-flex;
  align-items: center;
}
.wcp-mobile-icon-link svg {
  display: block;
  width:   20px;
  height:  20px;
}
.wcp-mobile-icon-link .wcp-menu-badge {
  top:   -6px !important;
  right: -10px !important;
}
