/**
 * Knowledge Centre (ht_glossary_term) single page — layout only.
 *
 * Loaded only on single Knowledge Centre entries edited with the Divi
 * Builder (hospital_tool_glossary_cpt_enqueue_layout_style()), and every
 * rule is additionally scoped to the No Sidebar layout, so Doctor, Service,
 * Department, normal pages/posts, the /knowledge-centre/ landing page and
 * Knowledge Centre entries with a sidebar are untouched.
 *
 * Divi offers its "Fullwidth" page layout (outer .container at 100%) only
 * for default post types, so on these entries Divi's single.php keeps the
 * outer .container at 80% / 1320px and every builder row sits at 80% of
 * that again. This file reproduces Divi's own Fullwidth page behaviour:
 *
 * 1. The outer .container is released to the full width (the element stays
 *    in the HTML; only its width changes).
 * 2. The title/post meta and the plugin's own header, image and related
 *    sections keep the normal content column (80%, max 1320px — the
 *    Divi Customizer "Content Width"; update both values here if that
 *    setting changes).
 * 3. Builder sections therefore run edge to edge, and builder rows keep
 *    Divi's default 80% / 1320px column, aligned with the title.
 *
 * Opt-in classes (Divi > Section/Row Settings > Advanced > CSS ID & Classes):
 *   htp-kc-fullwidth-section  Section: full width, ignoring any section
 *                             width/max-width/margin set in the builder.
 *   htp-kc-fullwidth-row      Row: fills the whole section width instead
 *                             of Divi's 80% column.
 *   htp-kc-content-row        Row: explicitly the normal content column
 *                             (same as Divi's default row; optional).
 *
 * Selectors include #main-content so they outrank Divi's
 * `.et-db #et-boc .et-l .et_pb_row` rule (which contains an ID) without
 * !important.
 */

/* 1. Outer container: full width. Divi's padding-top (58px) is kept. */
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content > .container {
	width: 100%;
	max-width: 100%;
}

/* 2. Non-builder parts stay in the normal content column. */
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .et_post_meta_wrapper,
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .hospital-tool-glossary-term__image,
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .hospital-tool-glossary-term__header,
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .hospital-tool-glossary-term__related {
	width: 80%;
	max-width: 1320px;
	margin-left: auto;
	margin-right: auto;
}

/* 3. Opt-in: full-width section. */
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .et_pb_section.htp-kc-fullwidth-section {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* 4. Opt-in: full-width row (spans its section). */
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .et_pb_row.htp-kc-fullwidth-row {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* 5. Opt-in: normal content row (Divi's default column, made explicit). */
body.single-ht_glossary_term.et_pb_pagebuilder_layout.et_no_sidebar #main-content .et_pb_row.htp-kc-content-row {
	width: 80%;
	max-width: 1320px;
	margin-left: auto;
	margin-right: auto;
}
