/* components/faq/Faq.module.scss */
@media (min-width: 720px) {
    .mk-faq__container {
        --column-count: 12;
        display: grid;
        row-gap: var(--grid-gutter);
        column-gap: min(var(--grid-gutter), calc(100% / 11));
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}
.mk-faq__heading { grid-column: span 12; margin-bottom: 6rem; }
.mk-faq__list {
    margin: 0;
    padding: 0;
    list-style: none;
    grid-column: 2 / span 10;
    border: 0.1rem solid var(--color-font);
    border-width: 0 0.1rem 0.1rem;
}

.mk-faq-item { margin: 0; padding: 0; background: var(--color-background); }
.mk-faq-item__question {
    margin: 0 0 -0.1rem;
    padding: 0;
    position: relative;
    font: inherit; /* the question's look is its block's text style (question) */
    border: 0.1rem solid var(--color-font);
    border-width: 0.1rem 0;
}
.mk-faq-item__button {
    margin: 0;
    border: 0;
    background: transparent;
    appearance: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, calc(1rem + 1 * ((100vw - 48rem) / 80)), 2rem) clamp(1.5rem, calc(1.5rem + 1.5 * ((100vw - 48rem) / 80)), 3rem);
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.mk-faq-item__button:focus { outline: none; }
.mk-faq-item__button:focus-visible { outline: 1px dotted currentColor; outline-offset: -4px; }

.mk-faq-item__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 3rem;
    height: 3rem;
    transition: transform 0.2s ease-in-out;
}
.mk-faq-item.is-open .mk-faq-item__icon { transform: rotate(-90deg); }
.mk-faq-item__icon-line {
    position: absolute;
    top: 1.2rem;
    left: 0.5rem;
    height: 0.5rem;
    width: 2.1rem;
    border: 0.1rem solid var(--color-font);
    transition: opacity 0.2s ease-in-out;
}
.mk-faq-item__icon::after {
    content: '';
    position: absolute;
    top: 1.3rem;
    left: 0.9rem;
    z-index: 2;
    height: 0.3rem;
    width: 1.1rem;
    background: var(--color-background-form);
    transition: opacity 0.2s ease-in-out;
}
.mk-faq-item__icon::before {
    content: '';
    position: absolute;
    top: 0.4rem;
    left: 1.3rem;
    z-index: 1;
    height: 2.1rem;
    width: 0.5rem;
    border: 0.1rem solid var(--color-font);
    background: var(--color-background-form);
}
.mk-faq-item.is-open .mk-faq-item__icon-line,
.mk-faq-item.is-open .mk-faq-item__icon::after { opacity: 0; }

.mk-faq-item__panel { overflow: hidden; max-height: 0; transition: max-height 0.45s cubic-bezier(0.25, 0.8, 0.35, 1); }
.mk-faq-item__answer { padding: 3rem; background: var(--color-background-form); }
@media (prefers-reduced-motion: reduce) {
    .mk-faq-item__panel, .mk-faq-item__icon, .mk-faq-item__icon-line, .mk-faq-item__icon::after { transition: none; }
}

/* Editable look (unset = the original). */
.mk-faq__heading { margin-bottom: var(--mk-faq-heading-gap, 6rem); }
.mk-faq__list, .mk-faq-item__question, .mk-faq-item__icon-line, .mk-faq-item__icon::before { border-color: var(--mk-faq-line, var(--color-font)); }
.mk-faq-item { background: var(--mk-faq-question-fill, var(--color-background)); }
.mk-faq-item__answer { background: var(--mk-faq-answer-fill, var(--color-background-form)); }
@media (min-width: 720px) {
    .mk-faq--narrow .mk-faq__list { grid-column: 3 / span 8; }
    .mk-faq--full .mk-faq__list { grid-column: 1 / -1; }
}

/* Item texts styled from the parent (unset = each block's own text style): the style
   reaches every item's text block ([class*="ts-"]); colour and alignment are set on the
   wrapper and inherited. */
.mk-faq[style*="--mk-faq-question-font-size:"] .mk-faq-item__question [class*="ts-"] {
    font-family: var(--mk-faq-question-font-family); font-size: var(--mk-faq-question-font-size); line-height: var(--mk-faq-question-line-height); font-weight: var(--mk-faq-question-font-weight);
    letter-spacing: var(--mk-faq-question-letter-spacing, normal); text-transform: var(--mk-faq-question-text-transform, none); font-style: var(--mk-faq-question-font-style, normal);
}
.mk-faq[style*="--mk-faq-question-color:"] .mk-faq-item__question { color: var(--mk-faq-question-color); }
.mk-faq[style*="--mk-faq-question-align:"] .mk-faq-item__question { text-align: var(--mk-faq-question-align); }
.mk-faq[style*="--mk-faq-answer-font-size:"] .mk-faq-item__answer [class*="ts-"], .mk-faq[style*="--mk-faq-answer-font-size:"] .mk-faq-item__answer [class*="ts-"] :is(p, li) {
    font-family: var(--mk-faq-answer-font-family); font-size: var(--mk-faq-answer-font-size); line-height: var(--mk-faq-answer-line-height); font-weight: var(--mk-faq-answer-font-weight);
    letter-spacing: var(--mk-faq-answer-letter-spacing, normal); text-transform: var(--mk-faq-answer-text-transform, none); font-style: var(--mk-faq-answer-font-style, normal);
}
.mk-faq[style*="--mk-faq-answer-color:"] .mk-faq-item__answer { color: var(--mk-faq-answer-color); }
.mk-faq[style*="--mk-faq-answer-align:"] .mk-faq-item__answer { text-align: var(--mk-faq-answer-align); }


/* The question text fills the row, so "Spørgsmål: justering" (the item's own or the
   FAQ's for all) can align it; unset, the button's text-align: left applies as before. */
.mk-faq-item__label { flex: 1 1 auto; }
/* The question block is a span: as a block its own alignment (block settings) applies. */
.mk-faq-item__label > .el-text { display: block; }
.mk-faq[style*="--mk-faq-question-align:"] .mk-faq-item__button { text-align: inherit; }
