/* PupVibes Gift — front office */
.pvgift-box,
.pvgift-box * {
  box-sizing: border-box;
}

.pvgift-box {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  clear: both;
}

.pvgift-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  width: 100%;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.pvgift-choice input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: .18rem;
}

.pvgift-choice-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pvgift-price {
  flex: 0 0 auto;
  font-weight: 600;
  white-space: nowrap;
}

.pvgift-message-wrap {
  width: 100%;
  min-width: 0;
  margin-top: .8rem;
}

.pvgift-message-wrap label {
  display: block;
  margin-bottom: .35rem;
  font-weight: 600;
}

.pvgift-message {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 76px;
  resize: vertical;
}

.pvgift-message-wrap small {
  display: block;
  max-width: 100%;
  margin-top: .25rem;
  text-align: right;
  opacity: .7;
  overflow-wrap: anywhere;
}

.pvgift-error {
  margin-top: .5rem;
  color: #b42318;
  overflow-wrap: anywhere;
}

.pvgift-cart {
  max-width: 100%;
  min-width: 0;
  margin-top: .5rem;
  font-size: .92rem;
}

.pvgift-cart-editor {
  max-width: 100%;
  min-width: 0;
  margin-top: .5rem;
}

.pvgift-cart-editor textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: .5rem;
}

.pvgift-studio {
  margin-top: 1rem;
}

.pvgift-button-total {
  display: inline-block;
  margin-left: .35em;
  white-space: nowrap;
}

/* Le module déplace ce bloc juste après les déclinaisons/options et juste
   avant la zone d'ajout au panier. Ces règles empêchent les parents flex/grid
   de lui imposer une largeur supérieure à l'écran. */
.product-information .pvgift-box,
.product-actions .pvgift-box,
form .pvgift-box {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .pvgift-box {
    margin: .75rem 0;
    padding: .8rem;
    border-radius: 6px;
  }

  .pvgift-choice {
    gap: .5rem;
  }

  .pvgift-choice-text {
    display: block;
  }

  .pvgift-price {
    display: inline-block;
    margin-top: .2rem;
  }

  .pvgift-message-wrap small {
    text-align: left;
  }

  .pvgift-button-total {
    margin-left: .25em;
  }
}


/* v0.1.3 — intégration dans la colonne des déclinaisons */
.pvgift-under-variants {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.product-variants + .pvgift-box,
[data-product-variants] + .pvgift-box {
  width: 100%;
}
@media (max-width: 767.98px) {
  .pvgift-under-variants {
    margin-top: .75rem;
    margin-bottom: .75rem;
  }
}


/* v0.1.5: cart edit controls are non-form elements so cart themes cannot
   interpret them as quantity/remove/submit buttons. */
.pvgift-cart .pvgift-edit,
.pvgift-cart .pvgift-save {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.pvgift-cart .pvgift-edit:focus-visible,
.pvgift-cart .pvgift-save:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* 0.1.6 — panier : toujours dans la zone d'information de la vraie ligne produit. */
.product-line__content-left > .pvgift-cart,
.product-line-grid-body > .pvgift-cart,
.cart-item .pvgift-cart {
  position: relative;
  z-index: 1;
  margin-top: .5rem;
}
.pvgift-cart button.pvgift-edit,
.pvgift-cart button.pvgift-save,
.pvgift-cart textarea {
  position: relative;
  z-index: 2;
}

/* 0.1.8 — message cadeau, rendu PupVibes plus doux et premium */
.pvgift-box{
  border:0;
  background:transparent;
  padding:0;
  margin:.85rem 0 1rem;
}

.pvgift-choice{
  align-items:center;
  gap:.55rem;
}
.pvgift-choice input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#ff8200;
}
.pvgift-choice-text{
  color:#9f4d12;
  gap:.35rem .55rem;
}
.pvgift-choice-text strong{
  font-weight:600;
}
.pvgift-price{
  color:#7d5c43;
  font-weight:600;
}

.pvgift-message-wrap{
  position:relative;
  margin-top:.8rem;
  padding:14px 14px 10px;
  border:1px solid #f2c987;
  border-radius:12px;
  background:#fffaf0;
  box-shadow:0 5px 16px rgba(101,67,33,.045);
}
.pvgift-message-wrap label{
  display:flex;
  align-items:center;
  gap:.4rem;
  margin:0 0 8px;
  color:#9f4d12;
  font-size:13px;
  font-weight:600;
}
.pvgift-message-wrap label::before{
  content:"✉";
  display:inline-grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#ffead0;
  color:#c45d0b;
  font-size:12px;
}
.pvgift-message{
  width:100%;
  min-height:88px;
  padding:11px 13px;
  border:1px solid #ead8bd;
  border-radius:9px;
  background:#fff;
  color:#2b211b;
  font:inherit;
  line-height:1.45;
  resize:vertical;
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.pvgift-message::placeholder{
  color:#a5978a;
  opacity:1;
}
.pvgift-message:focus{
  border-color:#ff8200;
  box-shadow:0 0 0 3px rgba(255,130,0,.12);
  background:#fffdf8;
}
.pvgift-message-wrap small{
  margin-top:6px;
  color:#8a7767;
  font-size:11px;
  opacity:1;
  text-align:right;
}
.pvgift-error{
  margin-top:7px;
  padding:7px 9px;
  border-radius:7px;
  background:#fff1ef;
  color:#a52a20;
  font-size:12px;
}

@media (max-width:575.98px){
  .pvgift-message-wrap{
    padding:12px 12px 9px;
    border-radius:10px;
  }
  .pvgift-message{
    min-height:82px;
  }
  .pvgift-message-wrap small{
    text-align:right;
  }
}
