/* ==========================================================================
   NX FORM WHITE & SIMULATION (STABLE MODULAR SPEC)
   File: form-white.css
   Role: Form Simulasi Kredit & Call Back Showroom
   ========================================================================== */

/* 1. Batasi Lebar Kontainer Form */
.nx-section-simulasi .nx-container-sm,
#formsimulasi .nx-container-sm,
#callback .nx-container-sm {
  width: 100% !important;
  max-width: 680px !important;
  margin-inline: auto !important;
  padding-inline: 1rem !important;
  box-sizing: border-box !important;
}

/* 2. Jarak Header ke Form */
.nx-hero-content-top {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  margin-bottom: clamp(24px, 4vw, 36px) !important;
}

.nx-hero-content-top .nx-h2 {
  margin: 10px 0 8px 0 !important;
  line-height: 1.2 !important;
}

.nx-hero-content-top .nx-lead {
  margin: 0 !important;
  max-width: 540px !important;
  line-height: 1.55 !important;
}

/* 3. Kartu Frame */
.nx-card {
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid #e2e8f0 !important;
  padding: clamp(20px, 4vw, 36px) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box !important;
}

/* 4. Base Form Layout: Default 1-Kolom Bersih (Aman untuk Call Back) */
.nx-form-white {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Field Group */
.nx-form-white .nx-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Label Typo */
.nx-form-white .nx-field label {
  display: block !important;
  margin: 0 !important;
  font-family: var(--font-heading, 'Geist', sans-serif) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

/* Input & Select */
.nx-form-white .nx-field input,
.nx-form-white .nx-field select {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font-family: var(--font-body, 'Geist', sans-serif) !important;
  font-size: 0.9375rem !important;
  color: #0f172a !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.nx-form-white .nx-field input::placeholder {
  color: #94a3b8 !important;
  font-size: 0.875rem !important;
}

.nx-form-white .nx-field input:focus,
.nx-form-white .nx-field select:focus {
  background-color: #ffffff !important;
  border-color: #007aff !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15) !important;
}

/* Custom Arrow Dropdown */
.nx-form-white .nx-field select {
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 36px !important;
}

/* Tombol Submit */
.nx-form-white .nx-form-submit {
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  margin-top: 6px !important;
  background-color: #007aff !important;
  border: none !important;
  border-radius: 9999px !important;
  color: #ffffff !important;
  font-family: var(--font-heading, 'Geist', sans-serif) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.3) !important;
  transition: all 0.25s ease !important;
}

.nx-form-white .nx-form-submit:hover {
  background-color: #005ecb !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(0, 122, 255, 0.4) !important;
}

/* Feedback Response */
.nx-form-white .nx-form-response {
  width: 100% !important;
  margin-top: 4px !important;
  font-family: var(--font-body, 'Geist', sans-serif) !important;
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

/* ==========================================================================
   5. KHUSUS FORM SIMULASI (DESKTOP: GRID 2-KOLOM PRESISI)
   ========================================================================== */
@media (min-width: 640px) {
  .nx-form-white.nx-form-simulation {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 16px !important;
    row-gap: 18px !important;
  }

  /* Field yang diberi class .nx-field-full atau tombol submit otomatis 1 baris penuh */
  .nx-form-white.nx-form-simulation .nx-field-full,
  .nx-form-white.nx-form-simulation .nx-form-submit,
  .nx-form-white.nx-form-simulation .nx-form-response {
    grid-column: 1 / -1 !important;
  }
}

/* ==========================================================================
   FIX: FORM CONTAINER & SUBMIT BUTTON WIDTH
   ========================================================================== */

/* Batasi lebar form container di desktop agar tidak melar */
.nx-form-container {
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  box-sizing: border-box;
}

/* Base form layout jika tidak memakai class .nx-form-white */
.nx-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.nx-form .nx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   FIX: HILANGKAN SEGITIGA ANEH PADA SELECT (APPLY SECARA GLOBAL KE .nx-select)
   ========================================================================== */
.nx-select,
.nx-form .nx-field select {
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
}

/* Hapus panah default di IE/Edge lama */
.nx-select::-ms-expand,
.nx-form .nx-field select::-ms-expand {
  display: none !important;
}

/* ==========================================================================
   FIX: TOMBOL CTA TIDAK TERLALU FULL-WIDTH (DESKTOP CENTERED)
   ========================================================================== */
.nx-form .nx-form-submit,
.nx-form-submit {
  width: 100% !important;
  max-width: 380px !important; /* Batas maksimal tombol agar tidak stretched */
  height: 52px !important;
  margin: 10px auto 0 auto !important; /* Centered di tengah form */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9999px !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  /* Di layar HP kecil, tombol tetap nyaman 100% full width */
  .nx-form .nx-form-submit,
  .nx-form-submit {
    max-width: 100% !important;
  }
}

/* ==========================================================================
   FIX: HAPUS SEGITIGA ANEH & EQUALIZE SELECT DENGAN INPUT GELAP
   ========================================================================== */

/* 1. Reset Select & pasang panah chevron bersih */
#form-atto1 select.nx-select,
#form-atto1 .nx-field select {
  /* Hapus icon picker bawaan browser */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  /* Samakan background gelap dan teks putih dengan field input lain */
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  height: 48px !important;
  padding: 0 42px 0 16px !important; /* Ruang di kanan untuk panah SVG */
  width: 100% !important;
  font-size: 0.9375rem !important;
  outline: none !important;
  cursor: pointer !important;

  /* Panah chevron minimalis putih transparan di sisi kanan */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px !important;
}

/* 2. Hilangkan panah default di Internet Explorer / Edge lama */
#form-atto1 select.nx-select::-ms-expand,
#form-atto1 .nx-field select::-ms-expand {
  display: none !important;
}

/* 3. Warna teks opsi dropdown saat dibuka */
#form-atto1 select.nx-select option {
  background-color: #0b1329 !important; /* Background dropdown menu gelap */
  color: #ffffff !important;
}

/* 4. Efek Focus */
#form-atto1 select.nx-select:focus,
#form-atto1 input.nx-input:focus {
  border-color: #007aff !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25) !important;
}