/* ==========================================================================
   components.css — nút, thẻ, ô icon, FAQ, form
   Lưu ý tương phản: chữ trắng trên cam #F36B1C chỉ ≈ 3,0:1 → chỉ dùng cỡ chữ đậm ≥ 18,7px.
   ========================================================================== */

/* ---- Nút ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 2px solid transparent; border-radius: var(--radius-button);
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--color-brand-blue); color: #fff; box-shadow: 0 8px 20px rgba(8, 97, 248, .28); }
.btn--primary:hover { background: #0753D8; box-shadow: 0 10px 24px rgba(8, 97, 248, .36); }

.btn--outline { background: #fff; color: var(--color-brand-blue); border-color: var(--color-border-strong); }
.btn--outline:hover { border-color: var(--color-brand-blue); box-shadow: 0 8px 20px rgba(8, 97, 248, .14); }

.btn--white { background: #fff; color: var(--color-brand-blue); box-shadow: 0 10px 24px rgba(0, 20, 90, .25); }
.btn--white:hover { box-shadow: 0 14px 30px rgba(0, 20, 90, .32); }

/* Nút cam: chữ ≥ 18,7px đậm (ngưỡng "chữ lớn" WCAG) để đạt tương phản 3:1 */
.btn--orange {
  background: linear-gradient(90deg, #EE6A0C, #E2540A); color: #fff;
  min-height: 56px; font-size: 18.7px; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(243, 107, 28, .35);
}
.btn--orange:hover { background: linear-gradient(90deg, #E5620A, #D84D08); box-shadow: 0 14px 30px rgba(243, 107, 28, .45); }
.btn--pill { border-radius: 999px; }
/* Nút nhỏ (header): sáng như các CTA cam khác. Chữ 18,7px đậm = "chữ lớn" nên đạt 3:1; màn rất hẹp (<375px) không đủ chỗ
   → quay về cam sẫm 15px để vẫn đạt 4,5:1 (xem media query ở css/sections.css). */
.btn--sm { min-height: 46px; padding: 0 20px; font-size: 18.7px; font-weight: 800; letter-spacing: 0; }
.btn--orange.btn--sm { box-shadow: 0 8px 22px rgba(243, 107, 28, .45); }
.btn--orange.btn--sm .icon { width: 18px; height: 18px; }
.btn--orange .icon { width: 20px; height: 20px; }
.btn--block { display: flex; width: 100%; }

/* ---- Ô icon bo tròn / bo góc ---- */
.icon-disc {
  display: grid; place-items: center; flex: none;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--tint-blue); color: var(--color-brand-blue);
}
.icon-disc .icon { width: 30px; height: 30px; }
.icon-disc--violet { background: var(--tint-violet); color: var(--color-brand-violet); }
.icon-disc--orange { background: var(--tint-orange); color: var(--color-brand-orange); }

/* ---- FAQ accordion ---- */
.faq-item {
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  box-shadow: 0 4px 16px rgba(16, 52, 124, .05);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.faq-item.is-open { box-shadow: var(--shadow-card); border-color: var(--color-border-strong); }
.faq-item h3 { font-size: inherit; font-weight: inherit; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 16px 18px; border: 0; background: none; text-align: left;
  font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--color-text-strong);
}
.faq-toggle {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--tint-blue); color: var(--color-brand-blue);
  transition: background-color .2s ease, color .2s ease;
}
.faq-toggle .icon { width: 15px; height: 15px; stroke-width: 2.6; grid-area: 1 / 1; }
.faq-toggle .icon--minus { display: none; }
.faq-item.is-open .faq-toggle { background: var(--color-brand-orange); color: #fff; }
.faq-item.is-open .icon--plus { display: none; }
.faq-item.is-open .icon--minus { display: block; }

.faq-a {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows .3s ease, visibility 0s linear .3s;
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.faq-a__inner { overflow: hidden; }
.faq-a__inner p { padding: 0 18px 18px; font-size: 15px; line-height: 1.65; color: var(--color-muted); }
/* Không có JS: hiện hết câu trả lời */
html:not(.js) .faq-a { grid-template-rows: 1fr; visibility: visible; }

/* ---- Form ---- */
.input {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  font-size: 15px; line-height: 1.4; color: var(--color-text-strong);
  background: #F3F8FF; border: 1.5px solid var(--color-border); border-radius: var(--radius-input);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.input::placeholder { color: var(--color-muted); opacity: 1; }
.input:hover { border-color: #B9CCEA; }
.input:focus, .input:focus-visible { outline: none; border-color: var(--color-brand-blue); background: #fff; box-shadow: 0 0 0 4px rgba(8, 97, 248, .16); }
.input[aria-invalid="true"] { border-color: #D92D20; background: #FFF8F7; }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, .16); }

.field { min-width: 0; }
.field__error { margin-top: 6px; font-size: 13px; line-height: 1.4; font-weight: 500; color: #C0271B; }
.field__error[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }


.btn--submit .btn__spinner { display: none; }
.btn--submit[data-loading="true"] { pointer-events: none; opacity: .85; }
.btn--submit[data-loading="true"] .btn__arrow { display: none; }
.btn--submit[data-loading="true"] .btn__spinner { display: block; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; font-weight: 500; }
.form-status[hidden] { display: none; }
.form-status--success { background: #E3F6EC; color: #0B6B4F; }
.form-status--error { background: #FEECEA; color: #A32017; }
.form-status--info { background: var(--tint-blue); color: var(--color-brand-navy); }

/* ---- Ô chọn, ô nhập dài, ô đồng ý, dòng bảo mật (form 7 ô) ---- */
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; color: var(--color-muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A4A86' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.select.has-value { color: var(--color-text-strong); }
.select option { color: var(--color-text-strong); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--color-muted); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-brand-blue); cursor: pointer; }
.consent input[aria-invalid="true"] { outline: 2px solid #D92D20; outline-offset: 2px; }
.form-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; line-height: 1.4; color: var(--color-muted); text-wrap: balance; }
.form-note .icon { width: 16px; height: 16px; }
