.nhbf-members { position: relative; padding: 91px 16px 0; }
.nhbf-members__sparkle { right: 0; top: -10px; width: 364px; }
.nhbf-members__watermark { left: -230px; top: 560px; font-size: 157px; transform: rotate(-90deg); }
.nhbf-members__grid {
  position: relative; z-index: 1; max-width: 1169px; margin: 28px auto 0;
  display: grid; grid-template-columns: 633fr 514fr; gap: 22px; align-items: stretch;
}

.nhbf-card { position: relative; background: #fff; border-radius: 22px; padding: 21px 28px 56px; }
.nhbf-card-maker { padding-left: 23px; padding-right: 23px; }
.nhbf-card__title { color: var(--nhbf-red-text); font-weight: 800; font-size: 24px; line-height: 1.1; }
.nhbf-card__intro { margin-top: 10px; font-weight: 600; font-size: 17px; line-height: 21px; }
.nhbf-card__label { margin-top: 13px; color: var(--nhbf-red-text); font-weight: 800; font-size: 18px; }
.nhbf-card__label em { font-style: italic; font-weight: 700; font-size: 16px; }
.nhbf-card__submit { position: absolute; left: 50%; bottom: -25px; transform: translateX(-50%); min-width: 207px; white-space: nowrap; }
.nhbf-card__submit:hover { transform: translateX(-50%) translateY(-1px); }
.nhbf-card-maker .nhbf-card__submit { min-width: 285px; }

.nhbf-field { margin-top: 10px; }
.nhbf-field label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 17px; color: var(--nhbf-text); }
.nhbf-field input, .nhbf-field select {
  width: 100%; height: 45px; padding: 0 16px; border: 1px solid var(--nhbf-cream-line); border-radius: 8px;
  background: var(--nhbf-cream); color: #2d2d2d; font: 600 16px "SVN-Gilroy", Arial, sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.nhbf-field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--nhbf-cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='m1 1 7 7 7-7' fill='none' stroke='%23474747' stroke-width='2'/%3E%3C/svg%3E") right 14px center no-repeat;
}
.nhbf-field select:disabled { cursor: not-allowed; opacity: .7; }
.nhbf-field input::placeholder { color: #8a8a8a; font-weight: 300; font-style: italic; }
.nhbf-field input:focus, .nhbf-field select:focus { border-color: #c9a96a; box-shadow: 0 0 0 3px rgba(201, 169, 106, .25); }
.nhbf-field.is-invalid input, .nhbf-field.is-invalid select, .nhbf-gifts.is-invalid .nhbf-gift { border-color: #e0242b; margin-bottom: 0; }
.nhbf-field__error { display: block; margin-top: 4px; color: #e0242b; font-size: 13px; font-weight: 600; }
.nhbf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.nhbf-gifts { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nhbf-gift {
  position: relative; height: 86px; border: 1px solid var(--nhbf-cream-line); border-radius: 10px; background: var(--nhbf-cream);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.nhbf-gift input { position: absolute; left: 11px; top: 10px; width: 14px; height: 14px; margin: 0; appearance: none; -webkit-appearance: none; border: 1px solid #b9ae95; border-radius: 50%; background: #fff; cursor: pointer; }
.nhbf-gift input:checked { border-color: #980d11; background: #980d11; box-shadow: inset 0 0 0 2px #fff; }
.nhbf-gift:has(input:checked) { border-color: #980d11; box-shadow: 0 0 0 2px rgba(152, 13, 17, .15); }
.nhbf-gift img { max-height: 80px; width: auto; }

/* Form tạo thẻ */
.nhbf-upload {
  position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 154px; margin: 0 !important; border: 1px dashed var(--nhbf-maroon); border-radius: 10px;
  background: var(--nhbf-cream); cursor: pointer; color: #474747; text-align: center; padding: 0 16px; word-break: break-word;
}
.nhbf-upload__text { font-weight: 300 !important; font-style: italic; font-size: 16px; }
.nhbf-card-preview { margin-top: 15px; width: 100%; filter: drop-shadow(0 8px 14px rgba(80, 0, 6, .3)); }
.nhbf-card-preview canvas { display: block; width: 100%; height: auto; border-radius: 12px; }

/* ---------- Popup ---------- */
.nhbf-popup { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .6); }
.nhbf-popup[hidden] { display: none; }
.nhbf-popup__box {
  position: relative; width: 100%; max-width: 562px; max-height: calc(100vh - 40px); overflow: auto;
  padding: 36px 20px 34px; border-radius: 36px; background: #fff; text-align: center;
  font-family: "SVN-Gilroy", Arial, sans-serif; color: var(--nhbf-text);
}
.nhbf-popup__close {
  position: absolute; right: 10px; top: 10px; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
  background: #b4000b; color: #fff; font: 800 26px/46px "SVN-Gilroy", Arial, sans-serif; padding: 0;
}
.nhbf-popup__title { padding: 0 44px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--nhbf-red-text); font-weight: 800; font-size: 36px; line-height: 1.15; text-align: center; }
.nhbf-popup__title svg { width: 44px; height: 44px; flex: 0 0 44px; align-self: flex-start; color: var(--nhbf-red-text); }
.nhbf-popup__text { margin: 18px auto 0; max-width: 480px; font-weight: 500; font-size: 26px; line-height: 1.25; }
.nhbf-popup__btn { margin-top: 28px; min-width: 360px; min-height: 76px; border-radius: 20px; text-transform: none; font-size: 26px; }
.nhbf-lookup-form input {
  display: block; width: 100%; height: 64px; margin-top: 44px; padding: 0 36px; border: 1px solid #b01c25; border-radius: 16px;
  font: italic 500 26px "SVN-Gilroy", Arial, sans-serif; outline: none;
}
.nhbf-lookup-form input::placeholder { color: #7a7a7a; }
.nhbf-lookup-result:empty { display: none; }
.nhbf-lookup-result { margin-top: 24px; text-align: left; display: grid; gap: 12px; }
.nhbf-lookup-item { padding: 14px 18px; border: 1px solid var(--nhbf-cream-line); border-radius: 14px; background: var(--nhbf-cream); font-size: 17px; line-height: 1.45; }
.nhbf-lookup-item b { color: var(--nhbf-red-text); }
.nhbf-status { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 700; font-size: 15px; color: #fff; background: #d08a00; }
.nhbf-status--approved { background: #1f8f3a; }
.nhbf-status--rejected { background: #c0000b; }
.nhbf-lookup-empty { text-align: center; font-size: 18px; font-weight: 600; }
.nhbf-card-result__img { width: 300px; margin: 20px auto 0; border-radius: 12px; }
.nhbf-popup.is-message .nhbf-popup__title { font-size: 30px; }
.nhbf-popup.is-message .nhbf-popup__text { font-size: 20px; }
.nhbf-popup.is-error .nhbf-popup__title { color: #c0000b; }

/* Nút đóng popup: trung hoà style <button> của Flatsome (padding, min-height, margin, line-height)
 * để luôn là hình tròn ở góc phải, không đè lên tiêu đề. */
.nhbf .nhbf-popup__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 46px; height: 46px; min-width: 0; min-height: 0; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center; flex: none;
  border: 0; border-radius: 50%; box-shadow: none; text-transform: none; letter-spacing: 0;
  background: #b4000b; color: #fff; font: 800 24px/1 "SVN-Gilroy", Arial, sans-serif;
}
.nhbf .nhbf-popup__close:hover { background: #8a0006; color: #fff; }
.nhbf .nhbf-popup__title { padding: 0 54px; }
@media (max-width: 767px) {
  .nhbf .nhbf-popup__close { top: 10px; right: 10px; width: 34px; height: 34px; font-size: 18px; }
  .nhbf .nhbf-popup__title { padding: 0 40px; }
}
.nhbf .nhbf-popup__close svg { width: 22px; height: 22px; display: block; }
@media (max-width: 767px) {
  .nhbf .nhbf-popup__close svg { width: 16px; height: 16px; }
}
