/* Yape Gateway Pro — frontend styles */
.ygp-fields,
.ygp-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-top: 8px;
  background: #faf7ff;
  border: 1px solid #e3d9f7;
  border-left: 4px solid #6b2fb3;
  border-radius: 8px;
  font-size: 14px;
  color: #1f1235;
}

.ygp-fields p,
.ygp-block p { margin: 0; line-height: 1.4; }

.ygp-fields strong,
.ygp-block strong { color: #6b2fb3; }

.ygp-fields label,
.ygp-block label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2a1750;
}

.ygp-fields input[type="text"],
.ygp-fields input[type="file"],
.ygp-block input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8b8e6;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}

.ygp-fields input:focus,
.ygp-block input:focus {
  outline: none;
  border-color: #6b2fb3;
  box-shadow: 0 0 0 3px rgba(107, 47, 179, .18);
}

.ygp-fields img,
.ygp-block img {
  display: block;
  max-width: 200px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e3d9f7;
  padding: 6px;
  background: #fff;
}

/* Thank-you / order page badge */
.ygp-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3ecff;
  color: #6b2fb3;
  font-weight: 600;
  font-size: 12px;
}

/* Admin license box */
.ygp-admin-license {
  padding: 12px 14px;
  background: #faf7ff;
  border: 1px solid #e3d9f7;
  border-left: 4px solid #6b2fb3;
  border-radius: 6px;
  margin: 8px 0 16px;
}
.ygp-admin-license.is-active { border-left-color: #16a34a; background: #f0fdf4; }
.ygp-admin-license.is-inactive { border-left-color: #dc2626; background: #fef2f2; }

/* Compact field shown under the Yape radio in classic checkout */
.ygp-fields--compact { padding: 12px 14px; }
.ygp-fields--compact .ygp-note { font-size: 13px; color: #4b3a73; }

/* Modal */
body.ygp-modal-open { overflow: hidden; }
.ygp-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.ygp-modal.is-open { display: block; }
.ygp-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 10, 40, 0.55);
  backdrop-filter: blur(2px);
}
.ygp-modal__dialog {
  position: relative;
  max-width: 440px;
  width: calc(100% - 32px);
  margin: 5vh auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(40, 10, 80, .35);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.ygp-modal__close {
  position: absolute; top: 8px; right: 10px;
  background: transparent; border: 0; font-size: 26px; line-height: 1;
  color: #6b2fb3; cursor: pointer; padding: 4px 10px;
}
.ygp-modal__header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid #efe7fb;
  background: linear-gradient(135deg, #f7f1ff 0%, #ffffff 100%);
}
.ygp-modal__logo { width: 36px; height: 36px; border-radius: 8px; }
.ygp-modal__header h2 { margin: 0; font-size: 18px; color: #2a1750; }
.ygp-modal__body { padding: 18px 20px; overflow-y: auto; }
.ygp-modal__body p { margin: 0 0 12px; }
.ygp-modal__qr { text-align: center; margin: 8px 0 14px; }
.ygp-modal__qr img {
  max-width: 200px; height: auto;
  border: 1px solid #e3d9f7; border-radius: 8px; padding: 6px; background: #fff;
}
.ygp-modal__help { font-size: 13px; color: #5a4a7a; }
.ygp-modal__body label { display: block; font-weight: 600; margin-bottom: 4px; color: #2a1750; }
.ygp-modal__body input[type="text"],
.ygp-modal__body input[type="file"] {
  width: 100%; padding: 10px 12px;
  border: 1px solid #c8b8e6; border-radius: 6px;
  background: #fff; font-size: 14px; box-sizing: border-box;
}
.ygp-modal__body input:focus {
  outline: none; border-color: #6b2fb3;
  box-shadow: 0 0 0 3px rgba(107,47,179,.18);
}
.ygp-modal__error { color: #b91c1c; font-size: 13px; }
.ygp-modal__footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid #efe7fb; background: #fbf8ff;
}
.ygp-modal__confirm { background: #6b2fb3 !important; border-color: #6b2fb3 !important; color: #fff !important; }
.ygp-modal__confirm:hover { background: #5a259a !important; border-color: #5a259a !important; }

/* Gateway list icon sizing */
.wc_payment_method.payment_method_yape label img { max-height: 28px; width: auto; vertical-align: middle; margin-left: 6px; }

/* Force the payment method radio to be visible even when the theme/WC hides it
   (WooCommerce hides the radio with inline style when only one method exists). */
.wc_payment_method.payment_method_yape > input[type="radio"],
li.wc_payment_method.payment_method_yape input.input-radio {
  -webkit-appearance: radio !important;
  -moz-appearance: radio !important;
  appearance: radio !important;
  display: inline-block !important;
  visibility: visible !important;
  position: static !important;
  opacity: 1 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 8px 0 0 !important;
  vertical-align: middle !important;
  accent-color: #6b2fb3;
  pointer-events: auto !important;
  clip: auto !important;
}
.wc_payment_method.payment_method_yape > label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}