
/* ============================================================
   MontyPay HPF — Card-style payment form
   ============================================================ */

/* Card container */
.card-form {
  background: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  max-width: 540px;
  width: 100%;
  margin: 16px auto;
  box-sizing: border-box;
}

/* Field group — stacked */
.mp-hpf-field-group {
  margin-bottom: 4px;
}

/* Field group — side by side (expiry + cvv) */
.mp-hpf-field-group--row {
  display: flex;
  gap: 32px;
}

.mp-hpf-field-group--row .mp-hpf-field-wrapper {
  flex: 1;
  min-width: 0;
  /* prevent overflow */
}

/* Individual field wrapper */
.mp-hpf-field-wrapper {
  padding: 12px 0 0;
}

/* Label */
.mp-hpf-label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: #243e87b8;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* Row: field + brand icon — brand pushed to far right */
.mp-hpf-row-space-between {
  display: flex;
  align-items: center;
  width: 100%;
}

.mp-hpf-row-space-between .mp-hpf-field {
  flex: 1;
  min-width: 0;
}

/* Brand logo — pinned to the right */
.mp-hpf-brand {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 8px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mp-hpf-brand img {
  max-height: 24px;
  max-width: 52px;
  object-fit: contain;
  display: block;
}

/* Iframe container — bottom border only */
.mp-hpf-field {
  width: 100%;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  overflow: hidden;
  background: transparent;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.mp-hpf-field iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block;
  background: transparent;
}

/* Bottom border */
.mp-hpf-divider {
  height: 1px;
  background: #e5e7eb;
  margin-top: 4px;
  transition: background 0.2s;
}

.mp-hpf-field-wrapper:focus-within .mp-hpf-divider {
  background: #243e87b8;
}

/* Validation states */
.mp-hpf-field-wrapper.mp-field-error .mp-hpf-divider {
  background: #ef4444;
}

.mp-hpf-field-wrapper.mp-field-valid .mp-hpf-divider {
  background: #22c55e;
}

/* Error message */
#montypay-hpf-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 12px;
  text-align: center;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 480px) {
  .card-form {
    padding: 18px 16px;
    border-radius: 12px;
  }

  /* Stack expiry + cvv vertically on small screens */
  .mp-hpf-field-group--row {
    flex-direction: column;
    gap: 0;
  }
}