/**
 * Frontend styles — Form liên hệ 1 (BEM: tgwv-form-lien-he-1)
 */

.tgwv-form-lien-he-1 {
  --tgwv-flh1-accent: var(--tgwv-brand, #0b4a92);
  --tgwv-flh1-btn-hover: var(--tgwv-brand, #0b4a92);
  --tgwv-flh1-title: #a18a68;
  --tgwv-flh1-max-width: 900px;
  --tgwv-flh1-border: #888;
  --tgwv-flh1-label: #555;
  --tgwv-flh1-error: #dc3545;
  background-color: #ffffff;
  border-top: 1px solid #eee;
  padding: 3rem 0;
}

.tgwv-form-lien-he-1__container {
  max-width: var(--tgwv-flh1-max-width);
  margin: 0 auto;
  padding: 1rem 1rem;
}

.tgwv-form-lien-he-1__title {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--tgwv-flh1-title);
  display: block;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.tgwv-form-lien-he-1__row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.tgwv-form-lien-he-1__group {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
}

.tgwv-form-lien-he-1__label {
  font-size: 13px;
  color: var(--tgwv-flh1-label);
  margin-bottom: 5px;
  font-weight: 500;
  transition: color 0.3s;
}

.tgwv-form-lien-he-1__label.is-invalid-label {
  color: var(--tgwv-flh1-error) !important;
}

.tgwv-form-lien-he-1__input,
.tgwv-form-lien-he-1__select {
  border: none;
  border-bottom: 1px solid var(--tgwv-flh1-border);
  padding: 8px 0;
  font-size: 15px;
  outline: none;
  background: transparent;
  transition: border-color 0.3s;
  border-radius: 0;
  width: 100%;
}

.tgwv-form-lien-he-1__input:focus,
.tgwv-form-lien-he-1__select:focus {
  border-bottom-color: var(--tgwv-flh1-accent);
}

.tgwv-form-lien-he-1__phone {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--tgwv-flh1-border);
  padding: 8px 0;
  transition: border-color 0.3s;
}

.tgwv-form-lien-he-1__phone.is-invalid {
  border-bottom-color: var(--tgwv-flh1-error) !important;
}

.tgwv-form-lien-he-1__phone-flag {
  width: 20px;
  height: auto;
  margin-right: 8px;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

.tgwv-form-lien-he-1__phone-prefix {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #333;
  margin-right: 8px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  max-width: 110px;
}

.tgwv-form-lien-he-1__phone-input {
  border: none;
  width: 100%;
  font-size: 15px;
  outline: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.tgwv-form-lien-he-1__input.is-invalid,
.tgwv-form-lien-he-1__select.is-invalid,
.tgwv-form-lien-he-1__textarea.is-invalid {
  border-color: var(--tgwv-flh1-error) !important;
}

.tgwv-form-lien-he-1__checkbox-group {
  margin-bottom: 35px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tgwv-form-lien-he-1__checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 30px;
}

.tgwv-form-lien-he-1__checkbox-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
  transition: color 0.3s;
}

.tgwv-form-lien-he-1__checkbox {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  accent-color: var(--tgwv-flh1-accent);
  cursor: pointer;
}

.tgwv-form-lien-he-1__textarea-group {
  margin-bottom: 35px;
  display: flex;
  flex-direction: column;
}

.tgwv-form-lien-he-1__textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--tgwv-flh1-border);
  padding: 12px;
  font-size: 14px;
  outline: none;
  background: transparent;
  resize: vertical;
  border-radius: 4px;
  transition: border-color 0.3s;
}

.tgwv-form-lien-he-1__textarea:focus {
  border-color: var(--tgwv-flh1-accent);
}

.tgwv-form-lien-he-1__radio-group {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
}

.tgwv-form-lien-he-1__radio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 30px;
}

.tgwv-form-lien-he-1__radio-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
}

.tgwv-form-lien-he-1__radio {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  accent-color: var(--tgwv-flh1-accent);
  cursor: pointer;
}

.tgwv-form-lien-he-1__privacy {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tgwv-form-lien-he-1__privacy-row {
  display: flex;
  align-items: flex-start;
}

.tgwv-form-lien-he-1__privacy-input {
  margin-right: 10px;
  width: 16px;
  height: 16px;
  accent-color: var(--tgwv-flh1-accent);
  cursor: pointer;
  margin-top: 3px;
  flex-shrink: 0;
}

.tgwv-form-lien-he-1__privacy-input.is-invalid {
  outline: 1px solid var(--tgwv-flh1-error);
  outline-offset: 2px;
}

.tgwv-form-lien-he-1__privacy-label {
  font-size: 14px;
  color: #495057;
  cursor: pointer;
  line-height: 1.4;
  font-weight: normal;
  margin-bottom: 0;
  transition: color 0.3s;
}

.tgwv-form-lien-he-1__privacy-label a {
  color: var(--tgwv-flh1-accent);
  text-decoration: underline;
}

.tgwv-form-lien-he-1__submit {
  text-align: center;
}

.tgwv-form-lien-he-1__submit-btn {
  border: 1px solid #111;
  background: transparent;
  color: #111;
  padding: 12px 45px;
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  cursor: pointer;
  outline: none;
}

.tgwv-form-lien-he-1__submit-btn:hover:not(:disabled) {
  background-color: var(--tgwv-flh1-btn-hover);
  border-color: var(--tgwv-flh1-btn-hover);
  color: #fff;
}

.tgwv-form-lien-he-1__submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.tgwv-form-lien-he-1__msg {
  display: none;
  margin: 0 0 16px;
  font-size: 14px;
  text-align: center;
}

.tgwv-form-lien-he-1__msg.is-visible {
  display: block;
}

.tgwv-form-lien-he-1__msg.is-success {
  color: #198754;
}

.tgwv-form-lien-he-1__msg.is-error {
  color: var(--tgwv-flh1-error);
}

.tgwv-form-lien-he-1__field-error {
  display: block;
  width: 100%;
  color: var(--tgwv-flh1-error);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 6px;
  font-weight: 500;
}

.tgwv-form-lien-he-1__privacy > .tgwv-form-lien-he-1__field-error,
.tgwv-form-lien-he-1__checkbox-group > .tgwv-form-lien-he-1__field-error {
  margin-top: 2px;
  padding-left: 26px;
}

.tgwv-form-lien-he-1__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Success modal (custom overlay — avoids Bootstrap modal nesting issues) */
.tgwv-flh1-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.tgwv-flh1-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px 24px 24px;
  border-radius: 12px;
  background-color: #ffffff;
  color: #1e293b;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: tgwvFlh1ModalIn 0.28s ease-out;
}

@keyframes tgwvFlh1ModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tgwv-flh1-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.tgwv-flh1-modal__close:hover,
.tgwv-flh1-modal__close:focus-visible {
  background-color: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.tgwv-flh1-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--tgwv-flh1-accent, var(--tgwv-brand, #0b4a92));
}

.tgwv-flh1-modal__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

.tgwv-flh1-modal__message {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #475569;
}

.tgwv-flh1-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  background-color: var(--tgwv-flh1-accent, var(--tgwv-brand, #0b4a92));
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.tgwv-flh1-modal__btn:hover {
  opacity: 0.92;
}

body.tgwv-flh1-modal--open {
  overflow: hidden;
}

.tgwv-form-lien-he-1.is-loading .tgwv-form-lien-he-1__submit-btn {
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .tgwv-form-lien-he-1 {
    padding: 2rem 0;
  }

  .tgwv-form-lien-he-1__row {
    gap: 20px;
    margin-bottom: 20px;
  }
}
