/* Camille Sourget - Offres : bouton et formulaire (reprend les codes du theme) */

/* Bouton sous "Acheter" : meme gabarit, couleurs inversees */
.woocommerce div.product .lcso-cta {
  order: 5;
  margin: 10px 0 0 0;
}

.woocommerce div.product form.cart:has(+ .lcso-cta) {
  margin-bottom: 0;
}

/* Largeur commune calculee par front.js : libelles centres */
.woocommerce div.product form.cart .lcso-buy {
  justify-content: center;
}

.lcso-btn {
  height: 40px;
  box-sizing: border-box;
  border: 1px solid #1F3E51;
  border-radius: 2px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1em;
  white-space: nowrap;
  text-decoration: none;
  color: #1F3E51;
  background: #fff;
  cursor: pointer;
  transition: all 200ms ease-in-out;
  -webkit-appearance: none;
  appearance: none;
}

.lcso-btn:hover,
.lcso-btn:focus-visible {
  border-color: #051926;
  background: #051926;
  color: #fff;
}

.lcso-btn-full {
  background: #1F3E51;
  color: #fff;
}

.lcso-btn-full:hover,
.lcso-btn-full:focus-visible {
  background: #051926;
}

.lcso-btn[disabled] {
  opacity: .55;
  cursor: default;
}

/* Fenetre : meme esprit que la fenetre "ajoute au panier" */
.lcso-overlay {
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

.lcso-overlay[hidden] {
  display: none;
}

.lcso-overlay.is-open {
  opacity: 1;
}

.lcso-modal {
  position: relative;
  background: #fff;
  border-radius: 2px;
  width: 100%;
  max-width: 600px;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 40px 40px 34px 40px;
  color: #1F3E51;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  line-height: 23px;
}

.lcso-modal *,
.lcso-modal *::before,
.lcso-modal *::after {
  box-sizing: border-box;
}

.lcso-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 200ms ease-in-out;
}

.lcso-close:hover {
  opacity: .5;
}

.lcso-close svg {
  fill: #1F3E51;
}

.lcso-head {
  padding: 0 30px 18px 0;
  margin-bottom: 18px;
  border-bottom: 1px solid #F9F4EE;
}

.lcso-title {
  display: block;
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
}

/* Prix affiche (non modifiable) a gauche du montant propose */
.lcso-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  margin: 0 0 6px 0;
}

.lcso-static {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 8px 12px;
  border: 1px solid #D5D9DB;
  border-radius: 3px;
  background: #F1F2F3;
  color: #6B757B;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  cursor: default;
  user-select: text;
}

.lcso-grid-price .lcso-field {
  margin-bottom: 0;
}

/* Message de seuil, sous les deux champs */
.lcso-hint {
  margin: 8px 0 0 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #990000;
}

.lcso-hint[hidden] {
  display: none;
}

.lcso-field.has-warning .lcso-amount input {
  border-color: #990000;
  box-shadow: none;
}

.lcso-grid-price + .lcso-hint + .lcso-grid,
.lcso-grid-price + .lcso-hint[hidden] + .lcso-grid {
  margin-top: 16px;
}

.lcso-intro {
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 23px;
}

.lcso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}

.lcso-field {
  margin: 0 0 14px 0;
}

.lcso-field label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  margin: 0 0 6px 0;
}

.lcso-opt {
  font-weight: 400;
  color: #80888D;
}

.lcso-req {
  font-weight: 400;
}

.lcso-field input,
.lcso-field select,
.lcso-field textarea {
  display: block;
  width: 100%;
  height: 50px;
  padding: 8px 12px;
  border: 1px solid #80888D;
  border-radius: 3px;
  background: #fff;
  color: #1F3E51;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  line-height: 22px;
  outline: none;
  box-shadow: none;
  transition: border-color 200ms ease-in-out;
}

.lcso-field textarea {
  height: 92px;
  resize: none;
}

.lcso-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.314 0.34L4 4.323L7.687 0.34' stroke='%231F3E51' stroke-miterlimit='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px auto;
}

.lcso-field input:focus,
.lcso-field select:focus,
.lcso-field textarea:focus {
  border-color: #1F3E51;
  box-shadow: 0 0 0 1px #1F3E51;
}

.lcso-field.has-error input,
.lcso-field.has-error select,
.lcso-field.has-error textarea {
  border-color: #990000;
  box-shadow: none;
}

.lcso-amount {
  position: relative;
}

.lcso-amount input {
  padding-right: 38px;
  font-weight: 600;
  font-size: 18px;
}

.lcso-amount span {
  position: absolute;
  right: 14px;
  top: 0;
  height: 50px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 18px;
  pointer-events: none;
}

.lcso-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lcso-error {
  margin: 0 0 18px 0;
  padding: 12px 16px;
  border-left: 3px solid #990000;
  background: #F9F4EE;
  color: #990000;
  font-size: 15px;
  line-height: 22px;
}

.lcso-note {
  margin: 4px 0 0 0;
  font-size: 13px;
  line-height: 20px;
  color: #80888D;
}

.lcso-note a {
  color: inherit;
  text-decoration: underline;
}

.lcso-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.lcso-actions .lcso-btn + .lcso-btn {
  margin-left: 10px;
}

.lcso-done strong {
  display: block;
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  margin-bottom: 12px;
}

.lcso-done p {
  margin: 0;
}

body.lcso-lock {
  overflow: hidden;
}

@media screen and (max-width: 600px) {
  .lcso-overlay {
    padding: 0;
    align-items: stretch;
  }

  .lcso-modal {
    max-width: none;
    padding: 30px 20px 24px 20px;
    border-radius: 0;
  }

  .lcso-grid {
    grid-template-columns: 1fr;
  }

  /* Prix affiche et offre restent cote a cote */
  .lcso-grid.lcso-grid-price {
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
  }

  .lcso-static,
  .lcso-amount input {
    font-size: 16px;
  }

  .lcso-title {
    font-size: 20px;
    line-height: 26px;
  }

  .lcso-actions {
    flex-direction: column-reverse;
  }

  .lcso-actions .lcso-btn {
    width: 100%;
  }

  .lcso-actions .lcso-btn + .lcso-btn {
    margin: 0 0 10px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lcso-overlay,
  .lcso-btn,
  .lcso-close {
    transition: none;
  }
}
