/* =========================================================
   MNG UI (clean + minimal)
   - Form UI + inner-card background image
   - Pills/Chips
   - Results (summary white text, name cards readable)
   ========================================================= */

/* ===== HERO (outer wrapper) ===== */
.mng-hero{
  position: relative;
  padding: 44px 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}

.mng-hero__overlay{
  position:absolute; inset:0;
  pointer-events:none;
}

/* ===== CARD (inner white area that has BG image) ===== */
.mng-card{
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 22px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* dark overlay for readability when card has bg image */
.mng-card::after{
  content:"";
  position:absolute; inset:0;
  background: rgba(0,0,0,.35);  /* ปรับ 0.25-0.55 ได้ */
  pointer-events:none;
  z-index: 0;
}

.mng-card > *{
  position: relative;
  z-index: 1;
}

/* heading/labels on dark overlay */
.mng-card__title{
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.60);
}

.mng-card__subtitle{
  margin: 0 0 18px;
  font-size: 15px;
  opacity: .9;
  color: rgba(255,255,255,.90);
  text-shadow: 0 2px 10px rgba(0,0,0,.60);
}

/* ===== FORM GRID ===== */
.mng-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: end;
}

.mng-field{
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mng-span-2{ grid-column: span 12; }

.mng-field label{
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.60);
}

.mng-grid input,
.mng-grid select{
  width: 100%;
  height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  outline: none;
}

.mng-grid input:focus,
.mng-grid select:focus{
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}

.mng-hint,
.mng-status{
  font-size: 12px;
  opacity: .85;
  color: rgba(255,255,255,.88);
  text-shadow: 0 2px 10px rgba(0,0,0,.60);
}

/* ===== Pills (Denomination) ===== */
.mng-pill-group{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mng-pill{
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.95);
  color: #111;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}

.mng-pill.is-active{
  background:#0ea5e9;
  border-color:#0ea5e9;
  color:#fff;
  box-shadow: 0 10px 22px rgba(14,165,233,.35);
}

/* ===== Chips (themes 1–3) ===== */
.mng-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mng-chip{
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.95);
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  color: #111;
}

.mng-chip.is-active{
  background:#0ea5e9;
  border-color:#0ea5e9;
  color:#fff;
}

/* ===== Action Button ===== */
.mng-actions{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
}

.mng-btn{
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #17c3b2;
  color: #061b1a;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(23,195,178,.35);
}

.mng-btn:hover{ opacity: .95; }

.mng-result{ margin-top: 18px; }

/* ===== RESULTS layout like ChristianNameGenerator ===== */
.mng-results{
  margin-top: 22px;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}

.mng-results__title{
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 900;
  color:#fff;
}

.mng-results__lead{
  margin: 0 0 18px;
  opacity: .9;
  color: rgba(255,255,255,.88);
}

.mng-results__h3{
  margin: 22px 0 10px;
  font-size: 28px;
  font-weight: 900;
  color:#fff;
}

.mng-summary{
  margin: 0 0 16px 0;
  padding-left: 18px;
  line-height: 1.8;
  color: rgba(255,255,255,.92);
}

.mng-summary b{ color:#fff; }
.mng-summary li::marker{ color: rgba(255,255,255,.75); }

.mng-results__desc{
  margin: 4px 0 18px;
  font-size: 22px;
  font-weight: 700;
  opacity: .95;
  color: rgba(255,255,255,.88);
}

.mng-cards-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* name cards should be readable (white card + dark text) */
.mng-name-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  color: #111;
  text-shadow: none;
}

.mng-name-card__name{
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
  color:#111;
}

.mng-name-card__arabic{
  font-weight: 500;
  opacity: .75;
}

.mng-name-card__row{
  margin: 6px 0;
  font-size: 14px;
  opacity: .92;
}

.mng-tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mng-tag{
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(14,165,233,.12);
  border: 1px solid rgba(14,165,233,.22);
  font-size: 12px;
  font-weight: 800;
  color:#111;
}

.mng-tryagain{
  display: flex;
  justify-content: center;
  margin: 22px 0 10px;
}

.mng-try-btn{
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(59,130,246,.25);
}

.mng-disclaimer{
  text-align: center;
  font-size: 12px;
  opacity: .75;
  margin-bottom: 6px;
  color: rgba(255,255,255,.75);
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .mng-cards-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px){
  .mng-field{ grid-column: span 12; }
  .mng-card__title{ font-size: 28px; }
  .mng-actions{ flex-direction: column; align-items: stretch; }
  .mng-btn{ width: 100%; }
}

@media (max-width: 640px){
  .mng-cards-grid{ grid-template-columns: 1fr; }
}
/* ===== FIX: Results page should be DARK text (white background) ===== */
.mng-results{
  color: #111 !important;
  text-shadow: none !important;
}

.mng-results__title,
.mng-results__h3{
  color: #111 !important;
  text-shadow: none !important;
}

.mng-results__lead,
.mng-results__desc,
.mng-summary,
.mng-disclaimer{
  color: #333 !important;
  text-shadow: none !important;
}

.mng-summary b{
  color: #111 !important;
}

/* bullet marker */
.mng-summary li::marker{
  color: #666 !important;
}

/* cards text */
.mng-name-card__name{
  color: #111 !important;
  text-shadow: none !important;
}
.mng-name-card__row{
  color: #222 !important;
  text-shadow: none !important;
}
.mng-name-card__arabic{
  color: #555 !important;
}
/* Center text inside Try Again button */
.mng-try-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: 52px;              /* ให้คงเดิมตามดีไซน์ */
  line-height: 1 !important; /* กันตัวหนังสือลอย */
  padding: 0 22px !important;
  text-decoration: none;     /* กัน underline ทำให้ดูชิดบน */
}
