/* style.css */

/* =========================
   GLOBAL RESET / FIXES
   ========================= */
   *, *::before, *::after {
    box-sizing: border-box;
  }
  
  html {
    /* Stops iOS/Chrome "text inflation" making mobile look bigger than desktop */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  body {
    margin: 0;
  
    background: #10123b;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  
    /* IMPORTANT: allow vertical scroll, but never allow horizontal scroll */
    overflow-x: hidden;
    overflow-y: auto;
  
    /* Center the card and give safe padding */
    min-height: 100svh;
    padding: 18px 12px;
  
    color: #fff;
  }
  
  /* Make sure the outer wrapper never causes width overflow */
  .wrap {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  /* =========================
     CARD
     ========================= */
  .card {
    background: #0b1220;
  
    border-radius: 16px;
  
    /* Responsive width (never exceed screen) */
    width: 100%;
    max-width: 420px;
  
    /* Card padding */
    padding: 18px 18px;
  
    /* Prevent any children forcing horizontal scroll */
    overflow: hidden;
  }
  
  /* =========================
     TYPOGRAPHY
     ========================= */
  h1 {
    color: #ff5a5f;
    margin: 0 0 12px;
  
    /* Desktop default */
    font-size: 42px;
    line-height: 1.05;
    font-weight: 800;
  
    /* CRITICAL: prevent long text forcing overflow */
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  
  label {
    display: block;
    margin-top: 10px;
    opacity: .85;
    font-size: 13px;
  
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  /* =========================
     FORM CONTROLS
     ========================= */
  input, select, textarea {
    width: 100%;
    max-width: 100%;
    display: block;
  
    border-radius: 12px;
    border: none;
  
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
  
    /* Prevent weird overflow in some mobile browsers */
    min-width: 0;
  }
  
  input, select {
    padding: 10px 12px;
    margin-top: 6px;
  }
  
  textarea {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    resize: none;
    margin-bottom: 10px;
  
    height: 44px;
    overflow: hidden;
    transition: height 180ms ease;
  }
  
  textarea:focus {
    height: 120px;
    overflow: auto;
  }
  
  /* Placeholders */
  input::placeholder,
  textarea::placeholder {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: #7f8899;
    opacity: 1;
  }
  
  /* =========================
     BUTTON
     ========================= */
  button {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  
    background: #ff5a5f;
    border: none;
    border-radius: 999px;
  
    font-size: 16px;
    font-weight: 800;
  
    cursor: pointer;
  }
  
  /* =========================
     FINEPRINT
     ========================= */
  .fineprint {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.5;
    color: #7f8899;
  
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  /* =========================
     CONFIRM ROW
     ========================= */
  .confirm-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  
    margin: 12px 0 12px;
    font-size: 13px;
    color: #9aa3b2;
  
    max-width: 100%;
  }
  
  .confirm-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    padding: 0;
    flex: 0 0 auto;
  }
  
  .confirm-row label {
    margin: 0;
    line-height: 1.4;
    cursor: pointer;
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  /* =========================
     PRICE ROW
     ========================= */
  .price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  
    margin: 12px 0;
  
    font-size: 15px;
    font-weight: 500;
  
    max-width: 100%;
  }
  
  .price-label {
    margin: 0;
  }
  
  .price {
    margin: 0;
    text-align: right;
    white-space: nowrap;
  }
  
  /* =========================
     PAYMENT TOGGLE
     ========================= */
  .pay-toggle {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    max-width: 100%;
  }
  
  .pay-pill {
    display: block;
    cursor: pointer;
    max-width: 100%;
  }
  
  .pay-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  
  .pay-pill-inner {
    display: flex;
    align-items: center;
    gap: 12px;
  
    padding: 12px 12px;
  
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
  
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
  
    /* Prevent overflow */
    max-width: 100%;
    min-width: 0;
  }
  
  .pay-pill-inner:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.18);
  }
  
  .pay-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  
    display: grid;
    place-items: center;
  
    background: rgba(252,71,84,.12);
    border: 1px solid rgba(252,71,84,.22);
    color: #fc5b68;
  
    flex: 0 0 40px;
  }
  
  .pay-ico svg {
    width: 20px;
    height: 20px;
  }
  
  .pay-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
  
    min-width: 0; /* allows text to wrap instead of overflow */
  }
  
  .pay-title {
    font-weight: 900;
    color: #EAF0FF;
  
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  .pay-sub {
    font-size: .9rem;
    color: rgba(234,240,255,.70);
  
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  /* Selected */
  .pay-pill input:checked + .pay-pill-inner {
    background: rgba(252,71,84,.10);
    border-color: rgba(252,71,84,.35);
    box-shadow: 0 0 0 3px rgba(252,71,84,.18);
  }
  
  /* =========================
     MOBILE OVERRIDES (SMALLER + SAFER)
     This is what you asked for: totally separate rules for small screens.
     ========================= */
  @media (max-width: 420px) {
    body {
      padding: 14px 10px;
    }
  
    .card {
      padding: 16px 14px;
      max-width: 100%;
      border-radius: 16px;
    }
  
    h1 {
      font-size: 34px; /* smaller on mobile */
      line-height: 1.05;
    }
  
    label {
      font-size: 12.5px;
    }
  
    input, select, textarea {
      font-size: 14px;
    }
  
    button {
      font-size: 15px;
      padding: 12px;
    }
  
    .fineprint {
      font-size: 11px;
    }
  
    /* Make the pills a bit tighter so nothing pushes width */
    .pay-pill-inner {
      padding: 11px 11px;
      border-radius: 14px;
    }
  
    .pay-ico {
      width: 38px;
      height: 38px;
      border-radius: 13px;
      flex: 0 0 38px;
    }
  
    .pay-title {
      font-size: 15px;
    }
  
    .pay-sub {
      font-size: 13px;
    }
  }
  