/* reset bootstrap grid inside form */
/* Form.io custom theme - Orange */
.formio-theme-orange {
  background-color: transparent;
  width: 100%;
  direction: rtl;
}

.formio-theme-orange .row {
  display: block;
  margin: 0;
}

.formio-theme-orange [class*="col-"],
.formio-theme-orange .col,
.formio-theme-orange .form-component,
.formio-theme-orange .form-group {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.formio-theme-orange .formio-form {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
  color: #1f2937;
}

.formio-theme-orange .card {
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 14px;
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 32px;
}

.formio-theme-orange .card > .card-header {
  background: #f97316;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 14px 14px 0 0;
  font-size: 15px;
  padding: 14px 18px;
}

.formio-theme-orange .card > .card-body {
  background: #fdfaf7;
  padding: 22px;
  border-radius: 0 0 14px 14px;
}

.formio-theme-orange .form-group.formio-component {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(249, 115, 22, 0.35);
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.formio-theme-orange .form-group.formio-component > label {
  flex: 0 0 320px;
  min-width: 0;
  max-width: 320px;
  text-align: right;
  color: #f97316;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formio-theme-orange .form-group.formio-component > .formio-component-widget,
.formio-theme-orange .form-group.formio-component > .input-group,
.formio-theme-orange .form-group.formio-component > div:not(label) {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.formio-theme-orange .input-group {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
}

.formio-theme-orange .input-group > * {
  max-width: 100%;
  box-sizing: border-box;
}

.formio-theme-orange .form-control,
.formio-theme-orange .choices__inner,
.formio-theme-orange textarea.form-control {
  width: 100%;
  background: #fff8ef;
  border: 1px solid rgba(249, 115, 22, 0.55);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.formio-theme-orange .form-control:focus,
.formio-theme-orange textarea.form-control:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
  outline: none;
}

.formio-theme-orange textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.formio-theme-orange .formio-component .help-block {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.9rem;
}

.formio-theme-orange .formio-errors {
  color: #dc2626;
  margin-top: 6px;
}

.formio-theme-orange .btn {
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .formio-theme-orange .form-group.formio-component {
    flex-direction: column;
    align-items: flex-start;
  }

  .formio-theme-orange .form-group.formio-component > label {
    flex: none;
    text-align: left;
  }
}
.formio-theme-orange {
  background-color: transparent;
  width: 100%;
}

.formio-theme-orange .formio-form {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
  color: #1f2937;
}

.formio-theme-orange .card {
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 14px;
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 32px;
}

.formio-theme-orange .card > .card-header {
  background: #f97316;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 14px 14px 0 0;
  font-size: 15px;
  padding: 14px 18px;
}

.formio-theme-orange .card > .card-body {
  background: #fdfaf7;
  padding: 22px;
  border-radius: 0 0 14px 14px;
}

.formio-theme-orange .control-label {
  color: #f97316;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  justify-self: flex-end;
}

.formio-theme-orange .control-label .field-required {
  color: #f97316;
  font-weight: 700;
  margin-inline-start: 4px;
}

.formio-theme-orange .form-control,
.formio-theme-orange .choices__inner,
.formio-theme-orange textarea.form-control {
  width: 100%;
  background: #fff8ef;
  border: 1px solid rgba(249, 115, 22, 0.55);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.formio-theme-orange .form-control:focus,
.formio-theme-orange textarea.form-control:focus,
.formio-theme-orange .choices__inner.is-focused {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
  outline: none;
}

.formio-theme-orange textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.formio-theme-orange .formio-component-textfield,
.formio-theme-orange .formio-component-textarea,
.formio-theme-orange .formio-component-number,
.formio-theme-orange .formio-component-email,
.formio-theme-orange .formio-component-datetime,
.formio-theme-orange .formio-component-phoneNumber,
.formio-theme-orange .formio-component-password,
.formio-theme-orange .formio-component-select,
.formio-theme-orange .formio-component-selectboxes,
.formio-theme-orange .formio-component-radio,
.formio-theme-orange .formio-component-checkbox,
.formio-theme-orange .formio-component-file,
.formio-theme-orange .formio-component-url,
.formio-theme-orange .formio-component-textField {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(249, 115, 22, 0.3);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.formio-theme-orange .formio-component-textfield > label,
.formio-theme-orange .formio-component-textarea > label,
.formio-theme-orange .formio-component-number > label,
.formio-theme-orange .formio-component-email > label,
.formio-theme-orange .formio-component-datetime > label,
.formio-theme-orange .formio-component-phoneNumber > label,
.formio-theme-orange .formio-component-password > label,
.formio-theme-orange .formio-component-select > label,
.formio-theme-orange .formio-component-selectboxes > label,
.formio-theme-orange .formio-component-radio > label,
.formio-theme-orange .formio-component-checkbox > label,
.formio-theme-orange .formio-component-file > label,
.formio-theme-orange .formio-component-url > label,
.formio-theme-orange .formio-component-textField > label {
  flex: 0 0 280px;
  min-width: 0;
  max-width: 280px;
  text-align: right;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formio-theme-orange .formio-component-textfield > :not(label),
.formio-theme-orange .formio-component-textarea > :not(label),
.formio-theme-orange .formio-component-number > :not(label),
.formio-theme-orange .formio-component-email > :not(label),
.formio-theme-orange .formio-component-datetime > :not(label),
.formio-theme-orange .formio-component-phoneNumber > :not(label),
.formio-theme-orange .formio-component-password > :not(label),
.formio-theme-orange .formio-component-select > :not(label),
.formio-theme-orange .formio-component-selectboxes > :not(label),
.formio-theme-orange .formio-component-radio > :not(label),
.formio-theme-orange .formio-component-checkbox > :not(label),
.formio-theme-orange .formio-component-file > :not(label),
.formio-theme-orange .formio-component-url > :not(label),
.formio-theme-orange .formio-component-textField > :not(label) {
  flex: 1;
  width: 100%;
}

/* إصلاح خاص لـ Select Components في Theme Orange */
.formio-theme-orange .formio-component-select > :not(label) {
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.formio-theme-orange .formio-component-select .choices {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.formio-theme-orange .formio-component-select .choices__inner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.formio-theme-orange .formio-component-select .choices__list--dropdown {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.formio-theme-orange .formio-component-radio .input-group,
.formio-theme-orange .formio-component-checkbox .input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.formio-theme-orange .formio-component-radio .form-check,
.formio-theme-orange .formio-component-checkbox .form-check {
  display: flex;
  align-items: center;
  gap: 6px;
}

.formio-theme-orange .formio-component-file .fileSelector,
.formio-theme-orange .formio-component-file .fileDrop {
  border: 1px solid #fbbf24;
  background: #fff7e2;
  padding: 18px;
  border-radius: 10px;
  color: #a16207;
  text-align: center;
  font-weight: 500;
}

.formio-theme-orange .formio-errors {
  grid-column: 1 / -1;
  color: #dc2626;
  margin-top: 6px;
}

.formio-theme-orange .formio-component .help-block {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.9rem;
}

.formio-theme-orange .btn {
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .formio-theme-orange .formio-component-textfield,
  .formio-theme-orange .formio-component-textarea,
  .formio-theme-orange .formio-component-number,
  .formio-theme-orange .formio-component-email,
  .formio-theme-orange .formio-component-datetime,
  .formio-theme-orange .formio-component-phoneNumber,
  .formio-theme-orange .formio-component-password,
  .formio-theme-orange .formio-component-select,
  .formio-theme-orange .formio-component-selectboxes,
  .formio-theme-orange .formio-component-radio,
  .formio-theme-orange .formio-component-checkbox,
  .formio-theme-orange .formio-component-file,
  .formio-theme-orange .formio-component-url,
  .formio-theme-orange .formio-component-textField {
    flex-direction: column;
    align-items: flex-start;
  }

  .formio-theme-orange .formio-component-textfield > label,
  .formio-theme-orange .formio-component-textarea > label,
  .formio-theme-orange .formio-component-number > label,
  .formio-theme-orange .formio-component-email > label,
  .formio-theme-orange .formio-component-datetime > label,
  .formio-theme-orange .formio-component-phoneNumber > label,
  .formio-theme-orange .formio-component-password > label,
  .formio-theme-orange .formio-component-select > label,
  .formio-theme-orange .formio-component-selectboxes > label,
  .formio-theme-orange .formio-component-radio > label,
  .formio-theme-orange .formio-component-checkbox > label,
  .formio-theme-orange .formio-component-file > label,
  .formio-theme-orange .formio-component-url > label,
  .formio-theme-orange .formio-component-textField > label {
    flex: none;
    min-width: auto;
    max-width: 100%;
    width: 100%;
    text-align: left;
  }
  
  .formio-theme-orange .form-group.formio-component {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .formio-theme-orange .form-group.formio-component > label {
    flex: none;
    min-width: auto;
    max-width: 100%;
    width: 100%;
  }
  
  .formio-theme-orange .form-group.formio-component > .formio-component-widget,
  .formio-theme-orange .form-group.formio-component > .input-group,
  .formio-theme-orange .form-group.formio-component > div:not(label) {
    width: 100%;
    max-width: 100%;
  }
}

