/* ==========================================================================
   Vhieu - New Password Plugin Stylesheet
   Modern & Minimalist UX (Option 1)
   ========================================================================== */

/* 1. Modern Password Row Header & Minimalist Trigger Link */
.vhnp-label-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px 12px !important;
  margin-bottom: 6px !important;
  width: 100% !important;
}

.vhnp-label-row label {
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
  font-weight: 600 !important;
  color: inherit !important;
}

.vhnp-trigger-wrap {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.vhnp-open-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #7A001F !important;
  color: #ffffff !important;
  border: 1px solid #7A001F !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(122, 0, 31, 0.2) !important;
  transition: all 0.18s ease !important;
}

.vhnp-open-link:hover {
  background: #5e0018 !important;
  border-color: #5e0018 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(122, 0, 31, 0.3) !important;
}

.vhnp-open-link:active {
  transform: translateY(0);
}

/* Ẩn hoàn toàn khung đỏ cũ nếu có cache */
.vhnp-trigger-box {
  display: none !important;
}

/* Ẩn link "Quên mật khẩu?" mặc định dưới chân form WooCommerce để tránh trùng lặp */
.woocommerce-form-login .lost_password,
.woocommerce-form-login .woocommerce-LostPassword {
  display: none !important;
}

/* 2. Modal Overlay & Dialog */
.vhnp-overlay {
  display: none;
  position: fixed;
  z-index: 999999;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vhnp-overlay.is-open {
  display: flex;
}

.vhnp-modal {
  position: relative;
  width: min(440px, 100%);
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  font-family: inherit;
  box-sizing: border-box;
}

.vhnp-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.vhnp-close:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.vhnp-icon {
  text-align: center;
  font-size: 38px;
  margin-bottom: 8px;
}

.vhnp-modal h3 {
  text-align: center;
  margin: 0 0 8px;
  color: #7A001F;
  font-size: 22px;
  font-weight: 700;
}

.vhnp-desc {
  text-align: center;
  color: #64748b;
  font-size: 13.5px;
  margin: 0 0 22px;
  line-height: 1.5;
}

.vhnp-modal label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  color: #334155;
  margin: 14px 0 6px;
}

.vhnp-modal input {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 46px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  outline: none !important;
  background: #fff !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.vhnp-modal input:focus {
  border-color: #7A001F !important;
  box-shadow: 0 0 0 3px rgba(122, 0, 31, 0.12) !important;
}

.vhnp-primary,
.vhnp-secondary {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  margin-top: 14px;
  transition: all 0.18s ease;
}

.vhnp-primary {
  border: 0;
  background: #7A001F;
  color: #ffffff;
}

.vhnp-primary:hover {
  background: #5e0018;
}

.vhnp-secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
}

.vhnp-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.vhnp-sent {
  background: #fdf2f4;
  color: #7A001F;
  border: 1px solid #f9d2d9;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
}

/* 3. OTP Code Input Boxes */
.vhnp-code-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 6px;
}

.vhnp-code-boxes .vhnp-digit {
  width: 48px !important;
  height: 56px !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0f172a !important;
}

.vhnp-code-boxes .vhnp-digit:focus {
  border-color: #7A001F !important;
  box-shadow: 0 0 0 3px rgba(122, 0, 31, 0.12) !important;
}

.vhnp-msg {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13.5px;
  text-align: center;
  line-height: 1.4;
}

.vhnp-msg.error {
  color: #dc2626;
}

.vhnp-msg.success {
  color: #16a34a;
}

/* 4. Result Screen */
.vhnp-result {
  margin-top: 18px !important;
  text-align: center;
  background: #fff7f8 !important;
  border: 1px solid #f3cbd2;
  border-radius: 12px !important;
  padding: 20px !important;
}

.vhnp-result-title {
  font-size: 18px;
  font-weight: 800;
  color: #7A001F;
  margin-bottom: 6px;
}

.vhnp-result-note {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.vhnp-password-label {
  display: block;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.vhnp-password-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #dcaab5;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 8px 8px 14px;
  min-height: 52px;
}

.vhnp-password-row strong {
  display: block;
  flex: 1;
  text-align: left;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 1.5px;
  color: #7A001F;
  word-break: break-all;
}

.vhnp-copy {
  flex: 0 0 auto;
  border: 1px solid #7A001F;
  background: #ffffff;
  color: #7A001F;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vhnp-copy:hover {
  background: #7A001F;
  color: #ffffff;
}

.vhnp-login {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 14px;
  background: #7A001F;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  transition: background 0.18s ease;
}

.vhnp-login:hover {
  background: #5e0018;
}

.vhnp-mail-note {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 480px) {
  .vhnp-modal {
    padding: 24px 18px;
  }
  .vhnp-code-boxes {
    gap: 6px;
  }
  .vhnp-code-boxes .vhnp-digit {
    width: 42px !important;
    height: 50px !important;
    font-size: 20px !important;
  }
  .vhnp-password-row strong {
    font-size: 16px;
  }
  .vhnp-copy {
    padding: 7px 10px;
    font-size: 12px;
  }
}
