.crm-lead-form-root {
  max-width: 760px;
  margin: 0 auto;
  color: #222;
  font-family: Arial, sans-serif;
}

.crm-lead-form-root.crm-font-loading {
  visibility: hidden;
}

.crm-lead-form-root * {
  box-sizing: border-box;
}

.crm-lead-form-root.fa-font,
.crm-lead-form-root.ar-font,
.crm-lead-form-root.fa-font *,
.crm-lead-form-root.ar-font *,
.crm-lead-form-root [lang="fa"],
.crm-lead-form-root [lang="ar"],
.crm-vazirmatn-ready .crm-lead-form-root.fa-font,
.crm-vazirmatn-ready .crm-lead-form-root.ar-font,
.crm-vazirmatn-ready .crm-lead-form-root.fa-font *,
.crm-vazirmatn-ready .crm-lead-form-root.ar-font *,
.crm-vazirmatn-ready .crm-lead-form-root [lang="fa"],
.crm-vazirmatn-ready .crm-lead-form-root [lang="ar"] {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif !important;
}

.crm-lead-form-root .crm-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
}

.crm-lead-form-root .crm-section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px 0;
  line-height: 1.7;
}

.crm-lead-form-root .crm-language-switch {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.crm-lead-form-root .crm-language-switch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  background: #fff;
  transition: 0.2s ease;
  font-weight: 600;
  line-height: 1.6;
}

.crm-lead-form-root .crm-language-switch label:hover {
  border-color: #999;
}

.crm-lead-form-root .crm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.crm-lead-form-root .crm-field-full {
  grid-column: 1 / -1;
}

.crm-lead-form-root .crm-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.crm-lead-form-root .crm-required {
  color: #d93025;
  margin-inline-start: 4px;
}

.crm-lead-form-root .crm-field input,
.crm-lead-form-root .crm-field select,
.crm-lead-form-root .crm-field textarea {
  width: 100%;
  border: 1px solid #cfd4dc;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.7;
  outline: none;
  background: #fff;
  color: #222;
  font-family: inherit;
}

.crm-lead-form-root .crm-field textarea {
  min-height: 130px;
  resize: vertical;
}

.crm-lead-form-root .crm-field input:focus,
.crm-lead-form-root .crm-field select:focus,
.crm-lead-form-root .crm-field textarea:focus {
  border-color: #666;
}

.crm-lead-form-root .crm-field input.crm-invalid,
.crm-lead-form-root .crm-field textarea.crm-invalid,
.crm-lead-form-root .crm-field select.crm-invalid {
  border-color: #d93025;
  background: #fff8f8;
}

.crm-lead-form-root .crm-error {
  margin-top: 7px;
  font-size: 13px;
  color: #d93025;
  line-height: 1.6;
  display: none;
}

.crm-lead-form-root .crm-success-message,
.crm-lead-form-root .crm-fail-message {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.crm-lead-form-root .crm-success-message {
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.crm-lead-form-root .crm-fail-message {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.crm-lead-form-root .crm-success-message.show,
.crm-lead-form-root .crm-fail-message.show {
  display: block;
}

.crm-lead-form-root .crm-submit-wrap {
  margin-top: 18px;
}

.crm-lead-form-root .crm-submit-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: #111827;
  color: #fff;
  transition: 0.2s ease;
  font-family: inherit;
}

.crm-lead-form-root .crm-submit-btn:hover {
  opacity: 0.92;
}

.crm-lead-form-root .crm-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.crm-lead-form-root.ltr-form {
  direction: ltr;
  text-align: left;
}

.crm-lead-form-root.rtl-form {
  direction: rtl;
  text-align: right;
}

@media (max-width: 768px) {
  .crm-lead-form-root .crm-form-grid {
    grid-template-columns: 1fr;
  }
}
