﻿/* faq.css - .faq accordion: .faq__question, .faq__answer, #faqSpoiler messenger-bubble chat */

/* Block: faq */
.faq {
    --faq-inline-pad: clamp(0.06rem, 0.25vw, 0.14rem);
    --faq-answer-indent: 1.62rem;
    --faq-bubble-border-strong: rgba(212, 184, 154, 0.5);
    --faq-bubble-border-soft: rgba(212, 184, 154, 0.35);
    --faq-bubble-q-bg:
        linear-gradient(135deg, rgba(212, 184, 154, 0.18) 0%, rgba(191, 167, 146, 0.08) 100%),
        rgba(191, 167, 146, 0.1);
    --faq-bubble-a-bg:
        linear-gradient(135deg, rgba(212, 184, 154, 0.12) 0%, rgba(191, 167, 146, 0.05) 100%),
        rgba(191, 167, 146, 0.08);
    --faq-bubble-shadow-strong:
        0 0.3rem 0.82rem rgba(212, 184, 154, 0.15),
        inset 0 1px 0 rgba(212, 184, 154, 0.35);
    --faq-bubble-shadow-soft:
        0 0.22rem 0.68rem rgba(212, 184, 154, 0.1),
        inset 0 1px 0 rgba(212, 184, 154, 0.25);
    margin-top: 0;
}

.faq__item {
    margin: 0 0 1.2rem;
    padding: 0;
    text-align: left;
    position: relative;
}

.faq__question {
    width: 100%;
    margin: 0;
    padding: 0 var(--faq-inline-pad);
    font-weight: 800;
    font-size: clamp(1.05rem, 3.1vw, 1.24rem);
    text-transform: uppercase;
    display: inline-flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.62rem;
    cursor: pointer;
    list-style: none;
    line-height: 1.35;
    position: relative;
    user-select: none;
}

.faq__question::before {
    content: none;
}

.faq__question::after {
    content: "";
    position: static;
    display: inline-block;
    width: 0.95rem;
    height: 0.95rem;
    border: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 6 9 12 15 18'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    transform-origin: center;
    transition: transform 0.25s ease;
    flex: 0 0 auto;
    margin-top: 0.1rem;
    opacity: 0.98;
}

.faq__question:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 4px;
    border-radius: 0.3rem;
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    position: relative;
    padding-left: calc(var(--faq-inline-pad) + var(--faq-answer-indent));
    padding-right: var(--faq-inline-pad);
    font-family: 'Lato', sans-serif !important;
    font-size: 1.2rem !important;
    color: rgba(255, 255, 255, 0.92) !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    text-align: left;
    letter-spacing: 0.01em;
    transition: max-height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.faq__item.is-open .faq__answer {
    max-height: 72rem;
    opacity: 1;
    margin-top: 0.62rem;
    margin-bottom: 1.08rem;
}

.faq__answer>p {
    position: relative;
    margin-top: 0;
    padding-left: 0;
}

.faq__answer::before {
    content: "";
    position: absolute;
    left: calc(var(--faq-inline-pad) + 0.22rem);
    top: 0.94rem;
    transform: translateY(-50%);
    width: 0.9rem;
    height: 0.9rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    opacity: 0.96;
}

/* Messenger-style FAQ (Q/A chat bubbles) */
#faqSpoiler {
    display: flex;
    flex-direction: column;
    gap: 1.02rem;
    margin-top: 0.18rem;
}

#faqSpoiler .faq__item {
    display: flex;
    flex-direction: column;
    gap: 0.58rem;
    margin: 0;
}

#faqSpoiler .faq__question {
    --faq-q-border: var(--faq-bubble-border-strong);
    --faq-q-bg: var(--faq-bubble-q-bg);
    align-self: flex-start;
    width: min(100%, 432px) !important;
    max-width: 432px !important;
    margin: 0;
    padding: 0.78rem 1.02rem 0.8rem;
    border-radius: 1.08rem 1.08rem 0.22rem 1.08rem;
    border: 2px solid var(--faq-q-border);
    background: var(--faq-q-bg);
    backdrop-filter: blur(12px) saturate(112%);
    -webkit-backdrop-filter: blur(12px) saturate(112%);
    color: #ffffff;
    font-size: clamp(0.98rem, 2.8vw, 1.08rem);
    font-weight: 800;
    text-transform: none;
    line-height: 1.35;
    letter-spacing: 0.01em;
    cursor: default;
    box-shadow: var(--faq-bubble-shadow-strong);
    user-select: text;
    position: relative;
    isolation: isolate;
    transition: all 0.3s ease;
}

#faqSpoiler .faq__question:hover {
    border-color: rgba(212, 184, 154, 0.75);
    background:
        linear-gradient(135deg, rgba(212, 184, 154, 0.25) 0%, rgba(191, 167, 146, 0.12) 100%),
        rgba(191, 167, 146, 0.15);
    box-shadow:
        0 4px 15px rgba(212, 184, 154, 0.2),
        inset 0 1px 0 rgba(212, 184, 154, 0.4);
}

#faqSpoiler .faq__question::after {
    content: none;
}

#faqSpoiler .faq__question:focus-visible {
    outline: 1px solid rgba(var(--site-bg-light-rgb), 0.78);
    outline-offset: 2px;
    border-radius: 1.08rem 1.08rem 0.22rem 1.08rem;
}

#faqSpoiler .faq__answer,
#faqSpoiler .faq__item.is-open .faq__answer {
    --faq-a-border: var(--faq-bubble-border-soft);
    --faq-a-bg: var(--faq-bubble-a-bg);
    align-self: center;
    width: min(100%, 432px) !important;
    max-width: 432px !important;
    max-height: none;
    opacity: 1;
    overflow: visible;
    margin: 0 auto;
    padding: 0.84rem 1rem 0.88rem;
    border-radius: 1.08rem 1.08rem 1.08rem 0.22rem;
    border: 1px solid var(--faq-a-border);
    background: var(--faq-a-bg);
    backdrop-filter: blur(12px) saturate(112%);
    -webkit-backdrop-filter: blur(12px) saturate(112%);
    color: rgba(255, 247, 238, 0.97) !important;
    /* TODO-DELETE if stable after test: line-height: 1.58 !important */
    box-shadow: var(--faq-bubble-shadow-soft);
    transition: all 0.3s ease;
    position: relative;
    isolation: isolate;
}

#faqSpoiler .faq__answer:hover,
#faqSpoiler .faq__item.is-open .faq__answer:hover {
    border-color: rgba(212, 184, 154, 0.55);
    background:
        linear-gradient(135deg, rgba(212, 184, 154, 0.18) 0%, rgba(191, 167, 146, 0.08) 100%),
        rgba(191, 167, 146, 0.12);
    box-shadow:
        0 4px 12px rgba(212, 184, 154, 0.15),
        inset 0 1px 0 rgba(212, 184, 154, 0.32);
}

#faqSpoiler .faq__answer::after {
    content: none;
}

#faqSpoiler .faq__answer::before {
    content: none;
}

#faqSpoiler .faq__answer>p {
    margin: 0 0 0.58rem;
    padding-left: 0;
}

#faqSpoiler .faq__answer>p:last-child {
    margin-bottom: 0;
}

#faqSpoiler .faq__answer--map,
#faqSpoiler .faq__item.is-open .faq__answer--map {
    align-self: center;
    width: min(100%, 432px);
    max-width: 432px;
    max-height: 460px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border-radius: 1.08rem !important;
}

#faqSpoiler .faq__answer--map .map-container {
    width: 100%;
    height: clamp(14rem, 46vw, 20.5rem);
}

