/* ==========================================================================
   LVD Recommendation — Insuroption Modal (Garantie So Discount)
   Ligne checkbox compacte dans le footer de la modale blockcart.
   Le toggle s'intègre avec les boutons Continuer / Voir mon panier.
   Palette : primary #4e2b73 · secondary #fd7325 · dark #200b3e
   ========================================================================== */

/* ── Row container ───────────────────────────────────── */

.inop-row {
  width: 100%;
  padding: 10px 14px;
  background: #f8f5fb;
  border: 1.5px solid #d9cde8;
  border-radius: 8px;
  margin-bottom: 8px;
  animation: inopSlideIn 0.35s ease-out;
  transition: opacity 0.2s ease;
}

/* Le thème applique  #blockcart-modal .modal-footer > * { padding:0 .5rem }
   ce qui sert de gouttière latérale (même que les .w-50 boutons).
   On garde ce padding externe et on utilise une div interne pour le padding contenu. */
#blockcart-modal .modal-footer > .inop-row {
  background: transparent;
  border: none;
  padding: 0 0.5rem;
  margin: 0 0 6px 0;
  animation: none;
}

#blockcart-modal .modal-footer > .inop-row .inop-inner {
  padding: 10px 14px;
  background: #f8f5fb;
  border: 1.5px solid #d9cde8;
  border-radius: 8px;
  animation: inopSlideIn 0.35s ease-out;
}

#blockcart-modal .modal-footer > .inop-row.inop-added .inop-inner {
  background: #edf9f0;
  border-color: #b8e6c4;
  animation: inopFadeIn 0.35s ease;
}

/* ── Toggle label (whole row is clickable) ───────────── */

.inop-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

/* ── Shield icon ─────────────────────────────────────── */

.inop-icon {
  color: #4e2b73;
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Text ────────────────────────────────────────────── */

.inop-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.inop-label {
  font-size: 13px;
  font-weight: 700;
  color: #200b3e;
  line-height: 1.25;
}

.inop-sub {
  font-size: 11px;
  color: #7c6a92;
  font-weight: 500;
  line-height: 1.2;
}

/* ── Price tag ───────────────────────────────────────── */

.inop-price {
  color: #fd7325;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Custom checkbox (orange square) ─────────────────── */

.inop-checkbox {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-left: 4px;
}

.inop-checkbox input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.inop-checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fd7325;
  border-radius: 5px;
  background: #fff;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.inop-checkmark::after {
  content: "\2713";
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.15s,
    transform 0.15s;
}

.inop-checkbox input:checked + .inop-checkmark {
  background: #fd7325;
  border-color: #fd7325;
}

.inop-checkbox input:checked + .inop-checkmark::after {
  opacity: 1;
  transform: scale(1);
}

/* ── Added state (green confirmation) ────────────────── */

.inop-row.inop-added {
  background: #edf9f0;
  border-color: #b8e6c4;
  animation: inopFadeIn 0.35s ease;
}

.inop-row.inop-added .inop-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inop-row.inop-added .inop-icon {
  color: #28a745;
}

.inop-row.inop-added .inop-label {
  color: #1a6b2f;
}

.inop-row.inop-added .inop-price {
  color: #28a745;
}

.inop-check-anim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #28a745;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  animation: inopCheckPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Animations ──────────────────────────────────────── */

@keyframes inopSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes inopFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes inopCheckPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Mobile ──────────────────────────────────────────── */

@media (max-width: 576px) {
  .inop-row {
    padding: 8px 10px;
  }

  .inop-toggle {
    gap: 8px;
  }

  .inop-label {
    font-size: 12px;
  }

  .inop-sub {
    font-size: 10px;
  }

  .inop-price {
    font-size: 12px;
  }

  /* Fix bouton "Continuer mes achats" qui casse sur 2 lignes */
  #blockcart-modal .modal-footer .w-50 .btn {
    font-size: 12px;
    padding: 10px 8px;
    white-space: nowrap;
  }
}
