/* Ch Medical : vert médical + doré, texte agrandi et boutons accessibles. */
.chm-pa-actions,
.chm-pa-actions * {
  box-sizing: border-box;
}

.chm-pa-actions {
  --chm-pa-green: #087f78;
  --chm-pa-green-hover: #06645f;
  --chm-pa-gold: #f5b82e;
  --chm-pa-gold-hover: #eaa91a;
  --chm-pa-ink: #173b3c;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin: 0;
}

form.cart .chm-pa-actions > .quantity {
  flex: 0 0 86px;
  float: none !important;
  width: 86px !important;
  margin: 0 !important;
}

form.cart .chm-pa-actions .quantity .qty {
  width: 100% !important;
  max-width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 12px 8px;
  border: 1px solid #cfe0dc;
  border-radius: 12px;
  background: #fff;
  color: var(--chm-pa-ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

form.cart .chm-pa-actions > .single_add_to_cart_button,
form.cart .chm-pa-actions > .chm-pa-buy-now {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  float: none !important;
  min-width: 0;
  min-height: 54px;
  height: auto;
  margin: 0 !important;
  padding: 15px 22px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  font-family: inherit;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none !important;
  text-transform: none !important;
  white-space: normal;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

form.cart .chm-pa-actions > .single_add_to_cart_button {
  flex: 1 1 180px;
  background: var(--chm-pa-green) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgb(8 127 120 / 15%);
}

form.cart .chm-pa-actions > .chm-pa-buy-now {
  flex: 1 1 100%;
  width: 100%;
  background: var(--chm-pa-gold) !important;
  color: var(--chm-pa-ink) !important;
  box-shadow: 0 4px 12px rgb(245 184 46 / 16%);
}

.chm-pa-buy-now svg {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
}

.chm-pa-cod-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 100%;
  color: #06645f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.chm-pa-cod-note svg { width: 20px; height: 20px; flex: 0 0 20px; }

body.chm-pa-modal-open { overflow: hidden; }

.chm-pa-order-dialog {
  display: none;
  box-sizing: border-box;
  width: min(1060px, calc(100% - 24px));
  max-width: 1060px;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6e7e1;
  border-radius: 20px;
  background: #fff;
  color: #173b3c;
  box-shadow: 0 24px 90px rgb(23 59 60 / 24%);
  font-family: inherit;
}

.chm-pa-order-dialog[open] { display: flex; flex-direction: column; }
.chm-pa-order-dialog::backdrop { background: rgb(13 38 39 / 62%); backdrop-filter: blur(3px); }
.chm-pa-order-dialog * { box-sizing: border-box; }

.chm-pa-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 20px 24px;
  border-bottom: 1px solid #e3eae6;
}

.chm-pa-dialog-heading h2 { margin: 0 0 5px !important; font-size: 24px !important; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; color: #173b3c; }
.chm-pa-dialog-heading p { margin: 0; color: #607373; font-size: 14px; line-height: 1.5; }

button.chm-pa-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: #edf5f1;
  color: #173b3c;
  cursor: pointer;
}
.chm-pa-dialog-close svg { width: 22px; height: 22px; }
.chm-pa-dialog-close:focus-visible,.chm-pa-dialog-footer a:focus-visible { outline: 3px solid #087f78; outline-offset: 3px; }

.chm-pa-order-dialog iframe {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: min(68dvh, 740px);
  min-height: 150px;
  border: 0;
  background: #f7faf9;
}

.chm-pa-dialog-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  flex: 1 1 auto;
  width: 100%;
  height: min(68dvh, 740px);
  min-height: 220px;
  padding: 24px;
  color: #52656a;
  font-size: 16px;
  text-align: center;
}
.chm-pa-dialog-loading[hidden],.chm-pa-order-dialog iframe[hidden] { display: none !important; }
.chm-pa-dialog-spinner { width: 34px; height: 34px; border: 3px solid #d8ece5; border-top-color: #087f78; border-radius: 50%; animation: chm-pa-spin .8s linear infinite; }
@keyframes chm-pa-spin { to { transform: rotate(360deg); } }

.chm-pa-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  padding: 12px 24px;
  border-top: 1px solid #e3eae6;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.chm-pa-dialog-footer strong { color: #06645f; font-weight: 600; }
.chm-pa-dialog-footer a { display: inline-flex; align-items: center; min-height: 32px; color: #52656a; text-decoration: underline; font-size: 13px; }
.chm-pa-dialog-footer a[hidden] { display: none !important; }

form.cart .chm-pa-actions > .single_add_to_cart_button:hover:not(:disabled):not(.disabled) {
  background: var(--chm-pa-green-hover) !important;
  box-shadow: 0 6px 18px rgb(8 127 120 / 22%);
  transform: translateY(-1px);
}

form.cart .chm-pa-actions > .chm-pa-buy-now:hover:not(:disabled) {
  background: var(--chm-pa-gold-hover) !important;
  box-shadow: 0 6px 18px rgb(245 184 46 / 25%);
  transform: translateY(-1px);
}

.chm-pa-actions .quantity .qty:focus-visible,
.chm-pa-actions > button:focus-visible {
  outline: 3px solid #173b3c !important;
  outline-offset: 3px;
}

form.cart .chm-pa-actions > button:disabled,
form.cart .chm-pa-actions > button.disabled {
  opacity: .5 !important;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@media (max-width: 480px) {
  .chm-pa-actions { gap: 10px; }
  form.cart .chm-pa-actions > .quantity {
    flex-basis: 76px;
    width: 76px !important;
  }
  form.cart .chm-pa-actions > .single_add_to_cart_button,
  form.cart .chm-pa-actions > .chm-pa-buy-now {
    font-size: 17px !important;
    padding: 15px 16px !important;
  }
  .chm-pa-dialog-heading { padding: 16px; }
  .chm-pa-dialog-heading h2 { font-size: 21px !important; }
  .chm-pa-dialog-heading p { font-size: 13px; }
  .chm-pa-dialog-footer { padding: 10px 16px; }
  .chm-pa-dialog-footer a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .chm-pa-actions > button { transition: none !important; }
  .chm-pa-actions > button:hover { transform: none !important; }
  .chm-pa-dialog-spinner { animation: none; }
}
