/**
 * MONA Smart Form ↔ theme 5S Media — nối markup .msf-* của plugin vào design của layout.
 *
 * Sau khi thay Contact Form 7 bằng mona-smart-form, form xuất markup cố định
 * (.msf-form / .msf-field / .msf-btn). File này phủ lại theo từng ngữ cảnh bọc:
 *   .foot-nl  → newsletter footer (input viên thuốc + nút gradient, hình chuẩn)
 *   .nw-nl    → newsletter sidebar tin tức
 *   .rv (trong .lh) → form liên hệ 2 cột
 *   .am-form  → form ứng tuyển trong modal
 * Biến màu (--purple/--blue/--ink…) do CSS từng trang cấp; có fallback phòng khi thiếu.
 */

/* ── dùng chung: bỏ nhãn "Powered by MONA" (domain nội bộ đã gỡ, nhưng chắc chắn) ── */
.msf-brand { display: none; }

/* ============================================================
   1) NEWSLETTER FOOTER  —  .foot-nl (input viên thuốc + nút gradient)
   ============================================================ */
.foot-nl .msf-form {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; max-width: 340px;
}
.foot-nl .msf-form .msf-field { flex: 1 1 auto; min-width: 0; margin: 0; gap: 0; }
.foot-nl .msf-form .msf-field label { display: none; }          /* chỉ dùng placeholder */
.foot-nl .msf-form input[type=email] {
  width: 100%; font-size: 13px; padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--g-brd-2, rgba(255,255,255,.45));
  background: rgba(255,255,255,.7); color: var(--ink, #141733);
}
.foot-nl .msf-form input[type=email]:focus {
  background: #fff; box-shadow: 0 0 0 3px rgba(59,130,214,.14);
}
.foot-nl .msf-form input::placeholder { color: var(--tx-faint, rgba(20,23,51,.4)); }
.foot-nl .msf-form > p:last-of-type { margin: 0; flex: 0 0 auto; }
.foot-nl .msf-form .msf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(96deg, var(--purple, #7A4DF0), var(--blue, #137EE8));
  color: #fff; font-weight: 600; font-size: 13.5px; padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 12px 26px -12px rgba(122,77,240,.6);
}
.foot-nl .msf-form .msf-btn::after {                            /* huy hiệu mũi tên tròn */
  content: "→"; display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(255,255,255,.22); font-size: 13px; line-height: 1;
}
.foot-nl .msf-form .msf-btn:hover { transform: translateY(-1px); }
.foot-nl .msf-form .msf-status { flex: 1 0 100%; order: 5; font-size: 12.5px; margin: 2px 0 0; }

/* ============================================================
   2) NEWSLETTER SIDEBAR TIN TỨC  —  .nw-nl (form id=nwNl)
   ============================================================ */
.nw-nl .msf-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; max-width: none; }
.nw-nl .msf-form .msf-field { flex: 1 1 160px; min-width: 0; margin: 0; gap: 0; }
.nw-nl .msf-form .msf-field label { display: none; }
.nw-nl .msf-form input[type=email] {
  width: 100%; font-size: 13.5px; padding: 11px 15px; border-radius: 12px;
  border: 1px solid var(--g-brd-2, rgba(255,255,255,.45)); background: rgba(255,255,255,.72);
}
.nw-nl .msf-form > p:last-of-type { margin: 0; flex: 0 0 auto; }
.nw-nl .msf-form .msf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(96deg, var(--purple, #7A4DF0), var(--blue, #137EE8));
  color: #fff; font-weight: 600; font-size: 13.5px; padding: 11px 18px; border-radius: 12px;
}
.nw-nl .msf-form .msf-btn::after {
  content: "→"; display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(255,255,255,.22); font-size: 12px;
}
.nw-nl .msf-form .msf-status { flex: 1 0 100%; order: 5; font-size: 12.5px; }

/* ============================================================
   3) FORM LIÊN HỆ  —  .rv trong .lh (2 cột)
   ============================================================ */
.lh .rv .msf-form { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.lh .rv .msf-form .msf-field { margin: 0 0 14px; }
/* các trường chiếm nguyên hàng */
.lh .rv .msf-form .msf-field[data-key="message"],
.lh .rv .msf-form .msf-status,
.lh .rv .msf-form > p:last-of-type { grid-column: 1 / -1; }
.lh .rv .msf-form > p:last-of-type { margin: 4px 0 0; }
.lh .rv .msf-form .msf-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(96deg, var(--purple, #7A4DF0), var(--blue, #137EE8));
  color: #fff; box-shadow: 0 14px 30px -12px rgba(122,77,240,.55);
}
.lh .rv .msf-form .msf-btn::after {
  content: "↗"; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(255,255,255,.22); font-size: 13px;
}
@media (max-width: 640px) { .lh .rv .msf-form { grid-template-columns: 1fr; } }

/* ============================================================
   4) FORM ỨNG TUYỂN  —  .am-form trong modal (#applyForm)
   ============================================================ */
.am-form .msf-form { max-width: none; margin: 0; }
.am-form .msf-form .msf-field { margin: 0 0 14px; }
.am-form .msf-form label { font-size: 13px; font-weight: 600; color: var(--ink, #141733); }
/* nút gửi thật nằm ở .am-footer (form=applyForm) → ẩn nút nội bộ của plugin */
.am-form .msf-form > p:last-of-type { display: none; }
/* ô upload CV: input file kiểu vùng thả gọn */
.am-form .msf-form .msf-field-file input[type=file] {
  width: 100%; padding: 18px 14px; border: 1.6px dashed #c9ccdb; border-radius: 12px;
  background: #F7F8FC; color: var(--tx-mut, rgba(20,23,51,.62)); font-size: 13.5px; cursor: pointer;
}
.am-form .msf-form .msf-field-file input[type=file]:hover { border-color: var(--purple, #7A4DF0); background: #f3f0fe; }
.am-form .msf-form .msf-file-name { display: block; margin-top: 7px; font-size: 13px; font-weight: 600; color: var(--purple, #7A4DF0); }

/* ── select mọi ngữ cảnh: mũi tên riêng cho gọn ── */
.msf-form select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A4DF0' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
