/* Časté otázky — templates/page/faq.html.twig, the `new-otazky` prototype.
   The documents' 550px column with the design's 16 / 24 / 40px sides, 40px to
   the header and 64px to the footer; the heading is `gk-h1-flow`, 38/48 as on
   the legal pages. The rows are the product page's accordion, with the
   question in medium rather than semibold. */

.gk-faq {
    max-width: calc(34.375rem + 2 * var(--gk-space-4));
    margin-inline: auto;
    padding: var(--gk-space-10) var(--gk-space-4) 4rem;
}

@media (min-width: 768px) {
    .gk-faq {
        max-width: calc(34.375rem + 2 * var(--gk-space-6));
        padding-inline: var(--gk-space-6);
    }
}

@media (min-width: 1024px) {
    .gk-faq {
        max-width: calc(34.375rem + 2 * var(--gk-space-10));
        padding-inline: var(--gk-space-10);
    }
}

.gk-faq__title {
    margin: 0;
    color: var(--gk-color-text);
    font-size: var(--gk-text-3xl);
    font-weight: var(--gk-weight-bold);
    line-height: 2.375rem;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

@media (min-width: 768px) {
    .gk-faq__title {
        font-size: var(--gk-text-4xl);
        line-height: 3rem;
    }
}

.gk-faq__group {
    margin-top: var(--gk-space-10);
}

.gk-faq__heading {
    margin: 0 0 var(--gk-space-4);
    color: var(--gk-color-text);
    font-family: var(--gk-font-body);
    font-size: var(--gk-text-lg);
    font-weight: var(--gk-weight-semibold);
    line-height: 1.5rem;
}

.gk-faq__list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--gk-color-border);
}

.gk-faq__row {
    border-bottom: 1px solid var(--gk-color-border);
    /* Opened from the address, a row lands below the sticky header. */
    scroll-margin-top: 4rem;
}

@media (min-width: 768px) {
    .gk-faq__row {
        scroll-margin-top: 5rem;
    }
}

.gk-faq__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gk-space-3);
    min-height: 3.5rem;
    padding: var(--gk-space-4) 0;
    list-style: none;
    cursor: pointer;
}

.gk-faq__summary::-webkit-details-marker {
    display: none;
}

.gk-faq__summary:focus {
    outline: none;
}

.gk-faq__summary:focus-visible {
    box-shadow: var(--gk-ring-focus);
}

.gk-faq__question {
    color: var(--gk-color-text);
    font-size: var(--gk-text-sm);
    font-weight: var(--gk-weight-medium);
    line-height: 1.25rem;
}

@media (hover: hover) {
    .gk-faq__summary:hover .gk-faq__question {
        text-decoration: underline;
    }
}

.gk-faq__summary:active .gk-faq__question {
    text-decoration: underline;
}

.gk-faq__summary svg {
    flex: none;
    color: var(--gk-color-text-soft);
    transition: transform 140ms ease;
}

.gk-faq__row[open] .gk-faq__summary svg {
    transform: rotate(180deg);
}

.gk-faq__answer {
    display: flex;
    flex-direction: column;
    gap: var(--gk-space-3);
    padding: var(--gk-space-2) 0 var(--gk-space-4);
}

.gk-faq__answer p {
    margin: 0;
    color: var(--gk-color-text);
    font-size: var(--gk-text-sm);
    line-height: 1.25rem;
    text-wrap: pretty;
}

.gk-faq__more {
    margin: var(--gk-space-10) 0 0;
    color: var(--gk-color-text-soft);
    line-height: 1.5rem;
}

/* Links in the text: its colour with a quiet underline, and a 44px target
   that does not move the line around it. */
.gk-faq__answer a,
.gk-faq__more a {
    margin: -14px -4px;
    padding: 14px 4px;
    color: var(--gk-color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--gk-color-border);
    text-underline-offset: 2px;
    transition: text-decoration-color 140ms ease;
}

@media (hover: hover) {
    .gk-faq__answer a:hover,
    .gk-faq__more a:hover {
        text-decoration-color: var(--gk-color-text);
    }
}

.gk-faq__answer a:active,
.gk-faq__more a:active {
    text-decoration-color: var(--gk-color-text);
}

.gk-faq__answer a:focus,
.gk-faq__more a:focus {
    outline: none;
}

.gk-faq__answer a:focus-visible,
.gk-faq__more a:focus-visible {
    box-shadow: var(--gk-ring-focus);
}
