
.collapsible:not(.accordion__item) {
    --color-border-horizontal: var(--root-color-border);
    --width-border-horizontal: var(--root-border-width);
    --box-shadow: var(--root-box-shadow);
    --font-size: var(--root-font-size); /* Reset, use REM */
}

.collapsible__button {
    --color-background: var(--root-color--white);
    --border-color: transparent;
    --color: var(--root-color--primary);
    --font-family: var(--root-heading-4-family);
    --font-size: 1.1666em;
    --font-style: var(--root-heading-4-style);
    --font-weight: var(--root-heading-4-weight);
    --line-height: var(--root-heading-4-line-height);
}

.collapsible__button:focus,
.collapsible__button:hover {
    --color-background: var(--root-color-interaction);
}

.collapsible__button:focus,
.collapsible__button:hover,
[data-collapsible]:not(.collapsible) .collapsible__button,
.collapsible.collapsible--open .collapsible__button {
    --border-color: var(--root-color--secondary);
}

.collapsible__toggle-icon {
    --color-icon: var(--root-color--secondary);
}

.collapsible--deactivated .collapsible__button:focus,
.collapsible--deactivated .collapsible__button:hover {
    --border-color: transparent;
    --color-background: var(--root-color--white);
}

.collapsible__panel {
    --color-background: var(--root-color--white);
    --border-color: transparent;
}

[data-collapsible]:not(.collapsible) .collapsible__panel,
.collapsible.collapsible--open .collapsible__panel {
    --border-color: var(--root-color--secondary);
}

.collapsible__content h2 {
    --font-size: 1.111em;
}

.collapsible__content h3 {
    --font-size: 1.111em;
}

.collapsible__content h4 {
    --font-size: 1em;
    --font-weight: var(--root-font-weight--bold);
    --font-color: var(--root-color-text);
}

.collapsible:not(.accordion__item) {
    border-block-start-style: solid;
    border-block-end-style: solid;
}

.section--collapsible + .section--collapsible .collapsible,
.collapsible + .collapsible,
.section--collapsible + .ce-shortcut > .ce-shortcut__container .section--collapsible:first-child .collapsible {
    border-block-start-width: 0 !important;
}

/* Sub content elements */
.collapsible .flow--outside {
    left: initial;
    right: initial;
    width: initial;
    margin-left: initial;
    margin-right: initial;
}

.collapsible .flow--outside .flow--content {
    padding-left: initial;
    padding-right: initial;
}

/* Deactivated collapsible */
.collapsible.collapsible--deactivated {
    border-block-start-width: 0;
    border-block-end-width: 0;
}

.collapsible__header {
    margin: 0;
    font-size: inherit;
}

.collapsible__button {
    display: flex;
    align-items: center;
    border-left-style: solid;
    border-width: 0 0 0 0.25rem;
    padding: 1rem 1rem 1rem calc(1rem - 0.25rem);
    cursor: pointer;
    width: 100%;
    transition: background-color 250ms ease-in-out, border 250ms ease-in-out;
    text-align: left;
}

.collapsible__text {
    flex-grow: 1;
}

.collapsible__toggle-icon {
    width: 1em;
    margin-left: 2.5rem;
    flex-shrink: 0;
    transition: transform 200ms ease-in-out;
}

.section--collapsible[dir="rtl"] .collapsible__toggle-icon {
    order: -1;
}

.collapsible.collapsible--open .collapsible__toggle-icon {
    transform: rotate(180deg);
}

/* Deactivated collapsible */
.collapsible--deactivated .collapsible__button {
    border-width: 0;
    cursor: default;
    padding: 0;
}

.collapsible--deactivated .collapsible__toggle-icon {
    display: none;
}

.collapsible__panel {
    border-left-style: solid;
    border-width: 0 0 0 0.25rem;
    transition: border 250ms ease-in-out;
    overflow: hidden;
}

.collapsible__content {
    padding: 1rem 1rem 2rem calc(1rem - 0.25rem);
}

.collapsible__content h4 + p,
.collapsible__content h4 + dl,
.collapsible__content h4 + blockquote,
.collapsible__content h4 + blockquote[type=cite],
.collapsible__content h4 + pre {
    margin-top: 0;
}

.collapsible__content > *:not([id^="c"]) .ce-bodytext:first-child > :first-child {
    margin-top: 0;
}

/* Deactivated collapsible */
.collapsible--deactivated .collapsible__panel {
    border-width: 0;
}

.collapsible--deactivated .collapsible__content {
    padding: 0;
}

.collapsible:not(.accordion__item) {
    border-block-start-color: var(--color-border-horizontal, hsla(0, 0%, 0%, 0.2));
    border-block-start-width: var(--width-border-horizontal, 0.063rem);
    border-block-end-color: var(--color-border-horizontal, hsla(0, 0%, 0%, 0.2));
    border-block-end-width: var(--width-border-horizontal, 0.063rem);
}

.collapsible.collapsible--open {
    box-shadow: var(--box-shadow, 0 0.25rem 1rem 0 rgba(0, 0, 0, 0.16));
}

.collapsible__button {
    background-color: var(--color-background, #ffffff);
    border-left-color: var(--border-color, transparent);
    color: var(--color, #022979);
    font-family: var(--font-family, inherit);
    font-size: var(--font-size, 1.5em);
    font-style: var(--font-style, normal);
    font-weight: var(--font-weight, bold);
    line-height: var(--line-height, inherit);
}

.collapsible__toggle-icon {
    fill: var(--color-icon, #456bd1);
}

.collapsible__panel {
    background-color: var(--color-background, #ffffff);
    border-left-color: var(--border-color, transparent);
}

.collapsible__content h2 {
    font-size: var(--font-size, 1.315em);
}

.collapsible__content h3 {
    font-size: var(--font-size, 1.25em);
}

.collapsible__content h4 {
    font-size: var(--font-size, 1.125em);
    font-weight: var(--font-weight, 600);
    color: var(--font-color, black);
}
