/* =========================
   MUNTERRA FORM — Consolidated & Fixed
   - single source (no duplicates)
   - container uses clamp(320px, 90vw, 1000px)
   - children protected from overflow
   - responsive breakpoints preserved
   ========================= */

/* Section wrapper */
.munterra_form_section {
  padding: 60px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* Container: prefer 90vw but never exceed 1000px */
.munterra_form_container {
  box-sizing: border-box;                        /* ensure padding included */
  width: clamp(320px, 90vw, 1000px);             /* full 90% until the 1000px cap */
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px clamp(16px, 3vw, 40px);
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* Header */
.munterra_form_header {
  text-align: left;
  margin-bottom: 28px;
}
.munterra_form_title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 8px;
  color: #fff;
}
.munterra_form_subtitle {
  color: #cfcfcf;
  font-size: 1rem;
}

/* Grid Layout */
.munterra_form_grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 20px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

/* Inputs */
.munterra_form_grid input,
.munterra_form_grid textarea {
  width: 100%;
  padding: 14px 16px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.munterra_form_grid input:focus,
.munterra_form_grid textarea:focus {
  border-color: #eec063;
  background: #141414;
  outline: none;
}

/* Select */
.munterra_form_selectwrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  box-sizing: border-box;
}
.munterra_form_selectwrap label {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}
.munterra_form_selectwrap select {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  box-sizing: border-box;
}
.munterra_form_selectwrap select:focus {
  border-color: #eec063;
  background: #141414;
  outline: none;
}

/* CTA */
.munterra_form_cta {
  margin-top: 24px;
  text-align: center;
}
.form-message {
  color: #fff;
}
#pay-now-submit-button {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(90deg, #f3e3c3, #eec063);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
#pay-now-submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* Protect children from forcing overflow */
.munterra_form_container *,
.munterra_form_grid,
.munterra_form_grid > * {
  box-sizing: inherit;
  min-width: 0;           /* critical to allow grid items to shrink */
}

/* Grid adjustments: keep 2-col on larger viewports; allow safe wrapping on small screens */
@media (max-width: 768px) {
  .munterra_form_grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .munterra_form_container {
    padding: 24px 16px;
    width: calc(100% - 28px); /* ~90% feel with safe gutters */
    max-width: none;
  }
}

/* extra small phones: button fills width */
@media (max-width: 480px) {
  .munterra_form_title { font-size: 1.6rem; }
  #pay-now-submit-button { width: 100%; box-sizing: border-box; }
}

/* Defensive override if inline styles exist */
.munterra_form_container[style] {
  width: clamp(320px, 90vw, 1000px) !important;
  max-width: 1000px !important;
}
