/* Custom styles for Inaris BtoB plugin */
.inaris-btob-container,
.inaris-btob-table {
    width: 100%;
    margin: 20px 0;
    font-size: 16px;
}

.inaris-btob-table {
    border-collapse: collapse;
}

.inaris-btob-table th,
.inaris-btob-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.inaris-btob-table th {
    background-color: #0A472E;
    color: #F6EAD7;
    font-weight: bold;
    padding: 8px 10px;
    font-size: 14px;
    height: 40px;
    line-height: 1.2;
}

.inaris-btob-input {
    width: 80px;
    padding: 8px;
    text-align: center;
    border: 1px solid #645C45;
    border-radius: 4px;
}

.inaris-btob-button {
    background-color: #8C9A44;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    position: relative;
}

.inaris-btob-button:hover {
    background-color: #645C45;
    transform: scale(1.05);
}

.inaris-btob-button .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

.inaris-btob-button.disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed;
    font-weight: normal;
    pointer-events: none;
}

.inaris-btob-price {
    font-weight: normal;
    color: #645C45;
    font-size: 16px;
}

/* Adjust the width of the quantity column */
.inaris-btob-table td:nth-child(5) {
    width: 100px;
}

/* 🎯 Jauge de franco de port stylisée */
.inaris-btob-franco-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #F6EAD7;
    border-radius: 12px;
    border: 2px solid #0A472E;
    text-align: center;
    font-family: inherit;
    position: relative;
}

.inaris-btob-franco-text {
    font-size: 16px;
    font-weight: bold;
    color: #0A472E;
    margin-bottom: 12px;
}

.inaris-btob-franco-bar {
    height: 24px;
    width: 100%;
    background-color: #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
}

.inaris-btob-franco-fill {
    height: 100%;
    background: linear-gradient(to right, #8C9A44, #A9C148);
    width: 0%;
    border-radius: 12px;
    transition: width 0.5s ease-in-out;
}

/* 📷 Colonne image plus fine */
.inaris-btob-table td:nth-child(1),
.inaris-btob-table th:nth-child(1) {
    width: 100px;
}

/* 📷 Image mini et centrée */
.inaris-btob-thumb-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.inaris-btob-thumb {
    width: 80px;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Container global */
.inaris-btob-quick-order {
  margin: 20px 0;
}

/* Header (search + mini-panier) */
.inaris-btob-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.inaris-btob-search {
  flex: 1;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.inaris-quick-order {
  margin: 20px 0;
  font-family: sans-serif;
}
.inaris-quick-order-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.inaris-quick-order-search {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.inaris-quick-order-cart {
  background: #8C9A44;
  color: #fff !important;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .2s;
}
.inaris-quick-order-cart:hover {
  background: #0A472E;
}
.inaris-quick-order-cart .total-amount {
  margin-left: 6px;
  font-weight: bold;
}

.inaris-quick-order-table {
  width: 100%;
  border-collapse: collapse;
}
.inaris-quick-order-table th,
.inaris-quick-order-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.inaris-quick-order-table th {
  background: #0A472E;
  color: #fff;
}
.inaris-quick-order-table .qo-thumb img {
  width: 50px; height: auto;
  border-radius: 4px;
}
.inaris-quick-order-table .qo-price {
  white-space: nowrap;
}
.inaris-quick-order-table .qo-qty {
  width: 60px;
  padding: 4px;
}

@media (max-width: 768px) {
  .inaris-quick-order-table,
  .inaris-quick-order-table thead,
  .inaris-quick-order-table tbody,
  .inaris-quick-order-table th,
  .inaris-quick-order-table td,
  .inaris-quick-order-table tr {
    display: block;
  }
  .inaris-quick-order-table thead tr {
    position: absolute;
    top: -9999px; left: -9999px;
  }
  .inaris-quick-order-table tr {
    margin: 0 0 10px 0;
  }
  .inaris-quick-order-table td {
    border: none;
    position: relative;
    padding-left: 50%;
  }
  .inaris-quick-order-table td:before {
    position: absolute;
    top: 8px; left: 10px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
  }
  .inaris-quick-order-table td:nth-of-type(1):before { content: "Image"; }
  .inaris-quick-order-table td:nth-of-type(2):before { content: "Produit"; }
  .inaris-quick-order-table td:nth-of-type(3):before { content: "Prix"; }
  .inaris-quick-order-table td:nth-of-type(4):before { content: "Quantité"; }
}


/* Centre et ajuste les colonnes du panier */
.woocommerce-cart-form__contents th.product-price,
.woocommerce-cart-form__contents td.product-price,
.woocommerce-cart-form__contents th.product-quantity,
.woocommerce-cart-form__contents td.product-quantity,
.woocommerce-cart-form__contents th.product-subtotal,
.woocommerce-cart-form__contents td.product-subtotal,
.woocommerce-cart-form__contents th.product-private-label,
.woocommerce-cart-form__contents td.product-private-label {
  text-align: center;
  vertical-align: middle;
}

/* Plus d’espace pour Quantity */
.woocommerce-cart-form__contents th.product-quantity,
.woocommerce-cart-form__contents td.product-quantity {
  width: 150px;
}

/* Privé-Label : empêcher le découpage des mots (sauf le <br>) */
.woocommerce-cart-form__contents th.product-private-label,
.woocommerce-cart-form__contents td.product-private-label {
  white-space: nowrap;
  width: 100px; /* ajustez selon vos besoins */
}
/* Empêcher le wrapping dans la colonne Quantity */
.woocommerce-cart-form__contents th.product-quantity,
.woocommerce-cart-form__contents td.product-quantity {
  white-space: nowrap;
  overflow: visible; /* ou hidden/auto selon si vous voulez couper ou voir le dépassement */
}
/* 1) Fiche produit – positionnement du toggle */
.inaris-private-label-field {
  margin-left: auto;       /* pousse à droite sur desktop */
  margin-top: 0.5em;
}
@media (max-width: 768px) {
  .inaris-private-label-field {
    margin-left: 0;
    margin-top: 1em;       /* sous les variations sur mobile */
  }
}
.toggle-label-text {
  margin-left: 8px;
  font-weight: 500;
}

/* 2) Style commun du toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 12px;
  transition: background 0.2s;
}
.toggle-switch .slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .slider {
  background-color: #0A472E;
}
.toggle-switch input:checked + .slider::before {
  transform: translateX(16px);
}

/* 3) Version “grisée” pour le panier */
.toggle-switch.disabled {
  opacity: 0.5;
  pointer-events: none;
}
/* Positionnement & centrage du toggle sur la fiche produit */
.inaris-private-label-field {
  display: block;
  max-width: 320px;    /* pour ne pas trop s’étirer sur desktop */
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 769px) {
  /* s’il reste dans le flow, on force son bloc centré */
  .inaris-private-label-field {
    margin-top: 1em;
    margin-bottom: 1em;
  }
}

/* Optionnel : réduire un peu l’espace entre qty & toggle */
.woocommerce-variation-add-to-cart .quantity + .inaris-private-label-field,
.quantity + .inaris-private-label-field {
  margin-top: 0.8em;
}

/* Assurez-vous que le toggle garde son style */
.toggle-switch {
  margin: 0;
}
.toggle-label-text {
  margin-left: 0.5em;
  vertical-align: middle;
}
/* Centre le toggle sous le champ quantité */
.inaris-private-label-field {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.2em 0;
}
.toggle-label-text {
  margin-left: 0.5em;
  font-weight: 500;
margin-right: 12px;
}
/* ==== Toggle “Private Label ?” ==== */
.inaris-private-label-field {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.2em 0;
}
.toggle-label-text {
  margin-left: 0.5em;
  font-weight: 500;
}
/* Arrondir à 25px les images des Slides et Image Carousel d’Elementor */
.elementor-widget-slides .swiper-slide img,
.elementor-widget-image-carousel .slick-slide img {
  border-radius: 25px !important;
  overflow: hidden;
  display: block;
}
.inaris-hide-price-login {
  color: #0A472E;
  text-decoration: underline;
  cursor: pointer;
}
.inaris-hide-price-login:hover {
  color: #8C9A44;
}
