.accordion { --header-height: 2.4em; --circle-height: 24px; gap: var(--Spacing-x3); width: 100%; padding-top: var(--Spacing-x3); transition: 0.3s ease-out; display: grid; grid-template-areas: "circle header" "content content"; grid-template-columns: auto 1fr; grid-template-rows: var(--header-height) 0fr; column-gap: var(--Spacing-x-one-and-half); transform-origin: top; } .header { grid-area: header; } .modifyButton { display: grid; grid-template-areas: "title button" "selection button"; cursor: pointer; background-color: transparent; border: none; width: 100%; padding: 0; } .modifyButton:disabled { cursor: default; } .title { grid-area: title; text-align: start; } .button { grid-area: button; justify-self: flex-end; transform-origin: 50% 50%; transition: transform 0.3s; } .buttonOpen { transform: rotate(180deg); } .selection { grid-area: selection; } .iconWrapper { position: relative; grid-area: circle; } .circle { width: var(--circle-height); height: var(--circle-height); border-radius: 100px; transition: background-color 0.4s; border: 2px solid var(--Base-Border-Inverted); display: flex; justify-content: center; align-items: center; } .circle[data-checked="true"] { background-color: var(--UI-Input-Controls-Fill-Selected); } .accordion[data-section-open="true"] .circle[data-checked="false"] { background-color: var(--UI-Text-Placeholder); } .accordion[data-section-open="false"] .circle[data-checked="false"] { background-color: var(--Base-Surface-Subtle-Hover); } .accordion[data-section-open="true"] { grid-template-rows: var(--header-height) 1fr; } .contentWrapper { opacity: 0; padding-bottom: var(--Spacing-x3); } .accordion[data-section-open="true"] .contentWrapper { opacity: 1; } .content { overflow: hidden; grid-area: content; border-bottom: 1px solid var(--Primary-Light-On-Surface-Divider-subtle); transform-origin: top; transition: opacity 0.2s linear; } .content:has([data-section-open="true"]) { overflow: visible; } @media screen and (min-width: 768px) { .accordion { column-gap: var(--Spacing-x3); grid-template-areas: "circle header" "circle content"; } .iconWrapper { top: var(--Spacing-x1); } .accordion:not(:last-child) .iconWrapper::after { position: absolute; left: 12px; bottom: calc(0px - var(--Spacing-x5)); top: var(--circle-height); content: ""; border-left: 1px solid var(--Primary-Light-On-Surface-Divider-subtle); } }