/* 
 * KM Premium Contact Form Styles
 * Minimalist Design - 2 Columns Desktop / 1 Column Mobile
 */

/* ==========================================================================
   Base Form Wrapper
   ========================================================================== */
.km-premium-form-wrapper {
  width: 100%;
  margin: 0 auto;
}

/* Base Form */
.custom-form {
  display: flex;
  flex-direction: column;
  /* Khoảng cách giữa các row theo chiều dọc */
}

/* ==========================================================================
   Rows and Groups (Grid Layout)
   ========================================================================== */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Chia 2 cột đều nhau */
  gap: 30px 40px;
  /* row-gap: 30px, column-gap: 40px */
}

/* Dành riêng cho row có 1 cột trải dài (Ví dụ: Loại hình) */
.form-row-single {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Khoảng cách từ label xuống input */
}

/* ==========================================================================
   Labels
   ========================================================================== */
.form-group label {
  text-transform: uppercase;
  font-size: 13px;
  color: #333333;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   Form Fields (Inputs & Selects)
   ========================================================================== */
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 0 0 10px 0;
  /* Padding dưới nhẹ */
  font-size: 15px;
  color: #333333;
  background-color: transparent;
  /* Nền trong suốt */
  border: none;
  /* Bỏ viền full mặc định */
  border-bottom: 1px solid #e0e0e0;
  /* Viền dưới xám nhạt */
  border-radius: 0;
  outline: none;
  box-shadow: none !important;
  transition: border-color 0.3s ease;
  font-family: inherit;
  height: 40px;
}

/* Hiệu ứng focus (Khi click vào ô nhập) */
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus {
  border-bottom: 1px solid #000000;
  /* Viền đậm lên màu đen */
  outline: none;
  box-shadow: none !important;
}

/* Placeholder Styling */
.form-group input::placeholder,
.form-group select::placeholder {
  color: #999999;
  font-size: 15px;
  /* Bằng với font size của input và option */
}

/* Tùy chỉnh thẻ Select (Dropdown mũi tên) */
.km-select-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0px center;
  background-size: 15px;
  cursor: pointer;
  padding-right: 20px;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */
.km-form-submit {
  margin-top: 10px;
}

.km-submit-btn {
  width: 100%;
  padding: 14px 25px;
  background-color: #223771;
  /* Xanh Navy brand */
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.km-submit-btn:hover {
  background-color: #1E2F6F;
  /* Cam brand */
  color: #ffffff;
}

/* ==========================================================================
   Form Response Messages
   ========================================================================== */
.km-form-response {
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   Render Email Only (Shortcode 2 cho footer)
   ========================================================================== */
.km-email-only-wrapper {
  width: 100%;
}

.km-form-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.km-form-inline-fields .km-form-field {
  flex: 1;
  min-width: 200px;
}

/* Style minimalist cho form email inline */
.km-form-inline-fields input {
  width: 100%;
  padding: 0 0 10px 0;
  font-size: 15px;
  color: #333333;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  outline: none;
  box-shadow: none !important;
  transition: border-color 0.3s ease;
  font-family: inherit;
  height: 40px;
}

.km-form-inline-fields input:focus {
  border-bottom: 1px solid #000000;
}

.km-form-inline-fields .km-submit-btn {
  width: auto;
  min-width: 150px;
  margin-top: 0;
}

/* ==========================================================================
   Mobile Responsive (Dưới 849px)
   ========================================================================== */
@media screen and (max-width: 849px) {
  .form-row {
    grid-template-columns: 1fr;
    /* Thành 1 cột duy nhất */
    gap: 25px;
    /* Giảm gap dọc trên mobile một chút */
  }

  .form-row-single {
    grid-template-columns: 1fr;
  }

  .km-form-inline-fields {
    flex-direction: column;
  }

  .km-form-inline-fields .km-form-field,
  .km-form-inline-fields .km-submit-btn {
    width: 100%;
    flex: none;
  }
}