:root {
  --ofek-primary: #04143d;
  --ofek-bg-light: var(--color-info-light);
  --ofek-text: var(--color-gray-800);
  --ofek-border: var(--color-wp-gray-light);
  --ofek-radius: 12px;
  --ofek-btn-radius: 12px;
}

.ofek-form-wrapper {
  direction: rtl;
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
}

.ofek-form-title {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: var(--space-2);
  color: #04143d;
}

.ofek-form-subtitle {
  font-size: 1rem;
  color: #04143d;
  text-align: center;
  margin-bottom: 2rem;
}

.ofek-field {
  margin-bottom: 1.5rem;
}

/* HIGH SPECIFICITY: Override global platform-forms.css rules */
.ofek-form-wrapper .ofek-field input[name="national_id"],
.ofek-form-wrapper .ofek-field input[name="phone"],
.ofek-form-wrapper .ofek-field input#national_id,
.ofek-form-wrapper .ofek-field input#phone {
  /* ALWAYS LTR for typing (like calculator) */
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext; /* Prevent bidi anomalies in RTL context */

  /* Visual styling */
  border-radius: var(--ofek-radius);
  border: 1px solid var(--ofek-border);
  padding: 16px 20px;
  width: 100%;
  font-size: 1.1rem;
}

/* Placeholder appears on RIGHT (without changing input direction) */
.ofek-form-wrapper .ofek-field input::placeholder {
  text-align: right;
  direction: rtl; /* Only for placeholder rendering */
}

.ofek-form-wrapper .ofek-field input:placeholder-shown {
  text-align: right !important;
}

/* Checkbox: position to the RIGHT of text using flexbox order */
.ofek-checkbox {
  background: var(--ofek-bg-light);
  border-radius: var(--ofek-radius);
  padding: var(--space-4);
  margin-bottom: 2rem;
}

.ofek-checkbox label {
  display: flex;
  direction: rtl !important; /* Force RTL for flexbox order to work */
  align-items: center;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  margin: 0;
}

.ofek-checkbox input[type="checkbox"] {
  order: 1; /* WAS 2 - checkbox should be FIRST in RTL flow = right side */
  width: 24px;
  height: 24px;
  min-width: 24px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
  margin-inline-start: 12px;
}

.ofek-checkbox label span {
  order: 2; /* WAS 1 - text should be SECOND in RTL flow = left side */
  flex: 1;
  line-height: 1.5;
  color: #04143d;
}

.ofek-btn-submit {
  background: #2e5aac; /* Lighter blue, same family as title */
  color: white;
  border-radius: var(--ofek-btn-radius);
  padding: 14px 32px;
  border: 1px solid transparent;
  width: 100%;
  font-size: 1rem;
  cursor: pointer;
  word-spacing: 8px;
}

.ofek-btn-submit:hover {
  border: 1px solid #2e5aac;
}

/* Help Section Spacing - override platform-forms.css */
.ofek-form-wrapper .help-section {
  margin-top: 2rem;
}

/* Optimize form spacing - reduce gaps slightly */
.ofek-field {
  margin-bottom: 1.25rem; /* Was 1.5rem */
}

.ofek-checkbox {
  margin-bottom: 1.5rem; /* Was 2rem */
}

.ofek-form-subtitle {
  margin-bottom: 1.5rem; /* Was 2rem */
}
