/**
 * TinyMCE inside Job Listings forms: width + spacing.
 * Without explicit width, the editor can shrink to a few pixels when the
 * source textarea is hidden and the parent is flex/grid (common with themes).
 *
 * @package Job_Listings
 */

.jl-emp-profile .tox.tox-tinymce,
.jl-ep .tox.tox-tinymce,
.jl-job-edit-modal .tox.tox-tinymce,
.job-apply-modal .tox.tox-tinymce,
.elementor-field-type-textarea .tox.tox-tinymce {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

.jl-emp-profile .tox-tinymce,
.jl-ep .tox-tinymce,
.jl-job-edit-modal .tox-tinymce,
.job-apply-modal .tox-tinymce {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.elementor-field-type-textarea .tox-tinymce {
  margin-bottom: 0.75rem;
}

#grj_employee_registration .elementor-field-type-textarea,
#grj_employer_registration .elementor-field-type-textarea,
#grj_job_listing_submission .elementor-field-type-textarea {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.jl-emp-profile .tox .tox-edit-area__iframe,
.jl-ep .tox .tox-edit-area__iframe,
.jl-job-edit-modal .tox .tox-edit-area__iframe,
.job-apply-modal .tox .tox-edit-area__iframe,
.elementor-field-type-textarea .tox .tox-edit-area__iframe,
.elementor-popup-modal .tox .tox-edit-area__iframe {
  width: 100% !important;
}

/*
 * Elementor flex + multi-step: without this, .tox-editor-header can end up with
 * height:100% and steal the entire column, leaving an empty toolbar and crushed iframe.
 */
.elementor-field-type-textarea .tox .tox-editor-header,
.elementor-popup-modal .tox .tox-editor-header {
  height: auto !important;
  flex: 0 0 auto;
}
.elementor-field-type-textarea .tox .tox-editor-container,
.elementor-popup-modal .tox .tox-editor-container {
  min-height: 0;
}
.elementor-field-type-textarea .tox .tox-sidebar-wrap,
.elementor-popup-modal .tox .tox-sidebar-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
