/* Psychbot FAQ 1.1.3 — styly jsou omezené výhradně na tento shortcode. */

/*
 * Twenty Twenty nastavuje margin a maximální šířku všem přímým potomkům
 * .entry-content. Jeho selektor s :not() má vysokou specificitu, proto se
 * !important používá jen pro vnější margin komponenty.
 */
section.psychbot-faq.psychbot-faq {
    --pf-accent: #2d95ce;
    --pf-text: #333b46;
    --pf-muted: #586475;
    --pf-border: #dcebf4;
    --pf-highlight: #f4faff;
    display: block;
    box-sizing: border-box;
    clear: both;
    width: 100%;
    margin: 0 auto !important;
    padding: 0;
    color: var(--pf-text);
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 400;
    letter-spacing: normal;
    text-align: left;
    scroll-margin-top: 9rem;
}

/*
 * Gutenberg obaluje shortcode do .wp-block-shortcode a může přidat mezery
 * samotnému obalu. :has() se použije jen při přítomnosti tohoto FAQ;
 * ostatní shortcode bloky na stránce zůstávají beze změny.
 */
.entry-content .wp-block-shortcode:has(> section.psychbot-faq),
.entry-content .wp-block-shortcode:has(> .psychbot-faq) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
section.psychbot-faq *,
section.psychbot-faq *::before,
section.psychbot-faq *::after { box-sizing: border-box; }

section.psychbot-faq .psychbot-faq__inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

section.psychbot-faq .psychbot-faq__list {
    display: grid;
    gap: 1.2rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

section.psychbot-faq .psychbot-faq__item {
    display: block;
    margin: 0;
    padding: 0;
    border: 1px solid var(--pf-border);
    border-radius: 1.2rem;
    background: #fff;
    box-shadow: 0 .3rem 1.3rem rgba(31, 69, 102, .035);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

section.psychbot-faq .psychbot-faq__item[open] {
    border-color: var(--pf-accent);
    background: var(--pf-highlight);
    box-shadow: 0 .5rem 2rem rgba(45, 149, 206, .08);
}

section.psychbot-faq .psychbot-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.8rem;
    width: 100%;
    margin: 0;
    padding: 2.2rem 2.5rem;
    cursor: pointer;
    color: var(--pf-text);
    background: transparent;
    font-family: 'Raleway', Arial, sans-serif;
    font-size: clamp(1.6rem, 1.6vw, 1.9rem);
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    list-style: none;
}

section.psychbot-faq .psychbot-faq__question::-webkit-details-marker { display: none; }
section.psychbot-faq .psychbot-faq__question::marker { content: ''; }
section.psychbot-faq .psychbot-faq__question:hover,
section.psychbot-faq .psychbot-faq__item[open] > .psychbot-faq__question { color: var(--pf-accent); }
section.psychbot-faq .psychbot-faq__question:focus-visible {
    outline: 3px solid var(--pf-accent);
    outline-offset: -4px;
}

section.psychbot-faq .psychbot-faq__question-text {
    display: block;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
}

section.psychbot-faq .psychbot-faq__symbol {
    position: relative;
    display: block;
    width: 3.1rem;
    height: 3.1rem;
    flex: 0 0 3.1rem;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: #e8f5fc;
    color: var(--pf-accent);
}
section.psychbot-faq .psychbot-faq__symbol::before,
section.psychbot-faq .psychbot-faq__symbol::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
}
section.psychbot-faq .psychbot-faq__symbol::before { width: 1.3rem; height: 2px; }
section.psychbot-faq .psychbot-faq__symbol::after { width: 2px; height: 1.3rem; transition: height .2s ease; }
section.psychbot-faq .psychbot-faq__item[open] .psychbot-faq__symbol { background: var(--pf-accent); color: #fff; }
section.psychbot-faq .psychbot-faq__item[open] .psychbot-faq__symbol::after { height: 0; }

section.psychbot-faq .psychbot-faq__answer {
    margin: 0;
    padding: 0 7rem 2.5rem 2.5rem;
    color: var(--pf-muted);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: normal;
    text-align: left;
}

/* Styly obsahu z editoru, nikoli typografie nadřazené šablony. */
.entry-content section.psychbot-faq .psychbot-faq__answer p,
section.psychbot-faq .psychbot-faq__answer p,
.entry-content section.psychbot-faq .psychbot-faq__answer li,
section.psychbot-faq .psychbot-faq__answer li {
    margin: 0;
    padding: 0;
    color: var(--pf-muted);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: normal;
}
.entry-content section.psychbot-faq .psychbot-faq__answer p + p,
section.psychbot-faq .psychbot-faq__answer p + p { margin-top: 1.2rem; }

section.psychbot-faq .psychbot-faq__answer > :first-child { margin-top: 0 !important; }
section.psychbot-faq .psychbot-faq__answer > :last-child { margin-bottom: 0 !important; }

.entry-content section.psychbot-faq .psychbot-faq__answer ul,
.entry-content section.psychbot-faq .psychbot-faq__answer ol,
section.psychbot-faq .psychbot-faq__answer ul,
section.psychbot-faq .psychbot-faq__answer ol {
    margin: 1rem 0 1.2rem;
    padding: 0 0 0 2.3rem;
    color: var(--pf-muted);
    font-size: 1.6rem;
    line-height: 1.75;
}
section.psychbot-faq .psychbot-faq__answer ul { list-style-type: disc; }
section.psychbot-faq .psychbot-faq__answer ol { list-style-type: decimal; }

/* Ponechat nadpisy vložené do odpovědi, ale bez obřích marginů ze šablony. */
.entry-content section.psychbot-faq .psychbot-faq__answer :is(h2, h3, h4, h5, h6) {
    margin: 1.3rem 0 .6rem;
    padding: 0;
    color: var(--pf-text);
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 700;
}

section.psychbot-faq .psychbot-faq__answer a {
    color: var(--pf-accent);
    text-decoration: underline;
}
section.psychbot-faq .psychbot-faq__answer a:hover { text-decoration: none; }
section.psychbot-faq .psychbot-faq__answer strong,
section.psychbot-faq .psychbot-faq__answer b { font-weight: 700; }

@media (max-width: 600px) {
    section.psychbot-faq .psychbot-faq__list { gap: 1rem; }
    section.psychbot-faq .psychbot-faq__question { padding: 1.7rem; gap: 1rem; }
    section.psychbot-faq .psychbot-faq__answer { padding: 0 1.7rem 2rem; }
    section.psychbot-faq .psychbot-faq__symbol { width: 2.9rem; height: 2.9rem; flex-basis: 2.9rem; }
    .entry-content section.psychbot-faq .psychbot-faq__answer p,
    .entry-content section.psychbot-faq .psychbot-faq__answer li,
    section.psychbot-faq .psychbot-faq__answer p,
    section.psychbot-faq .psychbot-faq__answer li { font-size: 1.5rem; }
    section.psychbot-faq .psychbot-faq__answer ul,
    section.psychbot-faq .psychbot-faq__answer ol { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    section.psychbot-faq .psychbot-faq__item,
    section.psychbot-faq .psychbot-faq__symbol::after { transition: none; }
}
