/* Caja de "fórmula médica obligatoria" en la ficha de producto. Antes era
   HTML con estilos inline; se movió acá para poder mantenerlo y para que el
   JS (wprx.js) pueda engancharse a clases estables. */

.wprx-box {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}

.wprx-box__title {
  margin: 0 0 8px;
  font-size: 15px;
}

.wprx-box__hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #444;
}

.wprx-file-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  cursor: pointer;
  margin-bottom: 4px;
}

.wprx-file-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.wprx-file-label__button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #0f2244;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.wprx-file-label__name {
  font-size: 13px;
  color: #555;
  word-break: break-all;
}

.wprx-file-label__name.has-file {
  color: #1a7a3d;
  font-weight: 600;
}

.wprx-file-error {
  margin: 4px 0 0;
  font-size: 13px;
  color: #c0392b;
}

.wprx-notes {
  margin: 10px 0 0;
}

.wprx-notes label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.wprx-notes textarea {
  width: 100%;
}

.wprx-privacy {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #d8d8d8;
}

.wprx-privacy__text {
  margin: 0 0 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.wprx-privacy__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #222;
  cursor: pointer;
}

.wprx-privacy__consent input {
  margin-top: 3px;
}

/* ---------------------------------------------------------------------
   Modal de carga de fórmula (flujo principal en navegador). Sutil: overlay
   suave, tarjeta centrada, misma paleta del sitio. z-index por encima de
   cualquier widget flotante de terceros. */

.wprx-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 34, 68, 0.5);
  padding: 16px;
}

.wprx-modal[hidden] {
  display: none;
}

.wprx-modal__card {
  background: #fff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 18px 20px 20px;
  box-shadow: 0 18px 50px rgba(15, 34, 68, 0.3);
}

.wprx-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.wprx-modal__title {
  margin: 0;
  font-size: 16px;
  color: #0f2244;
}

.wprx-modal__close {
  background: #f4f5f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  color: #20272b;
  cursor: pointer;
  flex-shrink: 0;
}

.wprx-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.wprx-modal__btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.wprx-modal__btn--secondary {
  background: #f0f1f3;
  color: #20272b;
}

.wprx-modal__btn--primary {
  background: #ff7f30;
  color: #fff;
}

.wprx-modal__btn--primary.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

body.wprx-modal-open {
  overflow: hidden;
}
