/* 
 * CF7 Premium Form Styles
 * Theme: Quiet Luxury / Modern Corporate
 */

.section-form-cf7 {
  background-color: #fdfdfd;
}

.css-form-cf7 {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.4s ease;
}

.css-form-cf7:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

.css-form-cf7 .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Các thẻ P chiếm toàn bộ chiều rộng */
.css-form-cf7 .wpcf7-form p {
  margin: 0;
  width: 100%;
}

.css-form-cf7 .wpcf7-form label {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151; /* Slate 700 */
  width: 100%;
}

/* Input, Textarea, Select */
.css-form-cf7 .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance):not(.wpcf7-radio):not(.wpcf7-checkbox) {
  width: 100% !important;
  background-color: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 1rem !important;
  color: #111827 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box;
}

.css-form-cf7 .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance):not(.wpcf7-radio):not(.wpcf7-checkbox):focus {
  background-color: #ffffff !important;
  border-color: var(--color-v1, #d29e31) !important;
  box-shadow: 0 0 0 4px rgba(210, 158, 49, 0.1) !important;
  outline: none !important;
}

/* Select riêng biệt */
.css-form-cf7 select.wpcf7-form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem !important;
}

/* Textarea */
.css-form-cf7 .wpcf7-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Radio & Checkbox */
.css-form-cf7 .wpcf7-radio,
.css-form-cf7 .wpcf7-checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.css-form-cf7 .wpcf7-list-item {
  margin: 0 !important;
}

.css-form-cf7 .wpcf7-list-item label {
  flex-direction: row !important;
  align-items: center !important;
  font-weight: 500 !important;
  cursor: pointer;
  gap: 0.5rem !important;
}

.css-form-cf7 .wpcf7-list-item input[type="radio"],
.css-form-cf7 .wpcf7-list-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-v1, #d29e31);
}

/* Acceptance */
.css-form-cf7 .wpcf7-acceptance label {
  font-weight: 400 !important;
  font-size: 0.875rem;
  color: #6b7280;
}

.css-form-cf7 .wpcf7-form label:has(.wpcf7-acceptance) {
  flex-direction: row;
}

/* Submit Button Customization */
.css-form-cf7 .wpcf7-submit {
  width: 100%;
  margin-top: 1rem;
  padding: 16px 32px !important;
  background: var(--color-v1) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 10px 20px -5px rgba(210, 158, 49, 0.3) !important;
}

.css-form-cf7 .wpcf7-submit:hover {
  transform: translateY(-3px);
  background: var(--color-v2) !important;
  box-shadow: 0 20px 25px -5px rgba(210, 158, 49, 0.4) !important;
}

.css-form-cf7 .cf7uxp-field-wrap.cf7uxp-valid::after,
.css-form-cf7 .wpcf7-form-control-wrap.cf7uxp-valid::after {
  display: none !important;
}

.css-form-cf7 .wpcf7-submit:active {
  transform: translateY(0);
}

/* Validation & Response */
.css-form-cf7 .wpcf7-not-valid-tip {
  font-size: 0.825rem !important;
  color: #ef4444 !important;
  font-weight: 500 !important;
  margin-top: 0.5rem !important;
}

.css-form-cf7 .wpcf7-response-output {
  margin: 1.5rem 0 0 !important;
  padding: 14px 20px !important;
  border: none !important;
  border-radius: 12px !important;
  background-color: #f3f4f6;
  color: #374151;
  font-weight: 600;
  text-align: center;
}

.css-form-cf7 .wpcf7-mail-sent-ok {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}

.css-form-cf7 .wpcf7-validation-errors {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
}
