
/*
 * Critical layout correction:
 * only the two outer contact columns are flex containers.
 * Form field columns must remain block containers so labels sit above inputs.
 */
html[dir="rtl"] .contact-page-section .php-email-form .row > [class*="col-"] {
  display: block !important;
  flex-direction: initial !important;
  align-items: initial !important;
}

html[dir="rtl"] .contact-page-section .php-email-form .row > .text-center {
  display: block !important;
}

html[dir="rtl"] .contact-page-section .php-email-form label {
  width: 100%;
}

/**
 * Washnah Arabic Contact Form
 * Keeps the Arabic form visually identical to the English version while
 * preserving correct RTL text flow and LTR handling for email and phone.
 */

html[dir="rtl"] .contact-page-section .contact-form-card {
  width: 100%;
}

html[dir="rtl"] .contact-page-section .php-email-form {
  width: 100%;
  height: 100%;
}

html[dir="rtl"] .contact-page-section .php-email-form .row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

html[dir="rtl"] .contact-page-section .php-email-form label {
  display: block;
  min-height: 20px;
  margin: 0 0 7px;
  color: var(--ink);
  font-family: "Tajawal", var(--default-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: right;
}

html[dir="rtl"] .contact-page-section .php-email-form input[type="text"],
html[dir="rtl"] .contact-page-section .php-email-form input[type="email"],
html[dir="rtl"] .contact-page-section .php-email-form input[type="tel"],
html[dir="rtl"] .contact-page-section .php-email-form select,
html[dir="rtl"] .contact-page-section .php-email-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid #d7dce2;
  border-radius: 12px;
  outline: 0;
  box-shadow: none;
  box-sizing: border-box;
  font-family: "Tajawal", var(--default-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

html[dir="rtl"] .contact-page-section .php-email-form input[type="text"],
html[dir="rtl"] .contact-page-section .php-email-form input[type="email"],
html[dir="rtl"] .contact-page-section .php-email-form input[type="tel"],
html[dir="rtl"] .contact-page-section .php-email-form select {
  height: 54px;
  min-height: 54px;
  padding: 12px 15px;
}

html[dir="rtl"] .contact-page-section .php-email-form textarea {
  min-height: 165px;
  padding: 14px 15px;
  resize: vertical;
}

html[dir="rtl"] .contact-page-section .php-email-form select {
  padding-right: 15px;
  padding-left: 48px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #687079 50%),
    linear-gradient(135deg, #687079 50%, transparent 50%);
  background-position:
    left 22px center,
    left 16px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

html[dir="rtl"] .contact-page-section .php-email-form input[type="email"],
html[dir="rtl"] .contact-page-section .php-email-form input[type="tel"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

html[dir="rtl"] .contact-page-section .php-email-form input:hover,
html[dir="rtl"] .contact-page-section .php-email-form select:hover,
html[dir="rtl"] .contact-page-section .php-email-form textarea:hover {
  border-color: #c4cad1;
}

html[dir="rtl"] .contact-page-section .php-email-form input:focus,
html[dir="rtl"] .contact-page-section .php-email-form select:focus,
html[dir="rtl"] .contact-page-section .php-email-form textarea:focus {
  background-color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(128, 25, 34, 0.09);
}

html[dir="rtl"] .contact-page-section .php-email-form input[aria-invalid="true"],
html[dir="rtl"] .contact-page-section .php-email-form select[aria-invalid="true"],
html[dir="rtl"] .contact-page-section .php-email-form textarea[aria-invalid="true"] {
  border-color: #c83737;
  box-shadow: 0 0 0 4px rgba(200, 55, 55, 0.08);
}

html[dir="rtl"] .contact-page-section .php-email-form button[type="submit"] {
  min-width: 190px;
  min-height: 52px;
  padding: 13px 28px;
  font-family: "Tajawal", var(--default-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

html[dir="rtl"] .contact-page-section .php-email-form .button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

html[dir="rtl"] .contact-page-section .php-email-form .button-icon {
  margin: 0;
}

html[dir="rtl"] .contact-page-section .form-privacy-note {
  max-width: 100%;
  margin: 15px auto 0;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 575.98px) {
  html[dir="rtl"] .contact-page-section .php-email-form .row {
    --bs-gutter-y: 1.15rem;
  }

  html[dir="rtl"] .contact-page-section .php-email-form input[type="text"],
  html[dir="rtl"] .contact-page-section .php-email-form input[type="email"],
  html[dir="rtl"] .contact-page-section .php-email-form input[type="tel"],
  html[dir="rtl"] .contact-page-section .php-email-form select {
    height: 52px;
    min-height: 52px;
  }

  html[dir="rtl"] .contact-page-section .php-email-form button[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}
