/* "Често задавани въпроси" as a conversation (parts/questions.php): the questions come in as messages; a click makes
   the house "type" (three bouncing dots) and its answer comes in on the other side; question marks float at the
   sides. */

.ask { position: relative; padding: 40px 0 90px; overflow: hidden; }
.ask__marks i { position: absolute; z-index: 0; font: 400 var(--s)/1 'Cabin Sketch', Arial, sans-serif; font-style: normal; opacity: .2; animation: ask-float var(--t) ease-in-out var(--d) infinite alternate; pointer-events: none; }
@keyframes ask-float { from { transform: translateY(0) rotate(-12deg); } to { transform: translateY(-34px) rotate(12deg); } }

.ask__chat { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; max-width: 920px; }
.ask__item { opacity: 0; transform: translateX(-40px); transition: opacity .6s, transform .8s cubic-bezier(.34, 1.3, .64, 1); }
.ask__item.is-in { opacity: 1; transform: none; }

/* ---------- The question ---------- */
.ask__q { display: flex; align-items: flex-end; gap: 12px; max-width: 80%; margin: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.ask__who { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #fff; font: 400 28px/1 'Cabin Sketch', Arial, sans-serif; font-style: normal; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .35); }
.ask__text { display: block; padding: 16px 22px; border-radius: 24px 24px 24px 6px; background: var(--c); color: #fff; font: 700 17px/1.45 'Open Sans', Arial, sans-serif; box-shadow: 0 14px 24px -16px rgba(40, 30, 20, .6); transition: transform .35s cubic-bezier(.34, 1.5, .64, 1), filter .3s; }
.ask__q:hover .ask__text, .ask__q:focus-visible .ask__text { transform: translateY(-3px); filter: brightness(1.06); }
.ask__q[aria-expanded="true"] .ask__text { filter: saturate(.85); }

/* ---------- The answer: the house types, then answers ---------- */
.ask__a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .55s cubic-bezier(.4, 0, .2, 1), visibility 0s .55s; }
.ask__item.is-typing .ask__a, .ask__item.is-open .ask__a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .55s cubic-bezier(.4, 0, .2, 1); }
.ask__in { display: flex; align-items: flex-end; justify-content: flex-end; gap: 12px; min-height: 0; overflow: hidden; padding-top: 14px; }
.ask__house { flex: none; order: 2; width: 54px; height: 54px; border-radius: 50%; background: #fff url('../images/montessorihouse.svg') no-repeat center 64% / 82%; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .35); }
.ask__typing { display: none; gap: 6px; padding: 18px 20px; border-radius: 22px 22px 6px 22px; background: #fff; box-shadow: 0 14px 24px -16px rgba(40, 30, 20, .5); }
.ask__typing i { width: 9px; height: 9px; border-radius: 50%; background: #aab4bb; animation: ask-dot .9s ease-in-out infinite; }
.ask__typing i:nth-child(2) { animation-delay: .15s; } .ask__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ask-dot { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-7px); } }
.ask__item.is-typing .ask__typing { display: flex; }
/* (the answers came from the old site with fonts of their own written in: one font for all of them here) */
.ask__bubble * { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; color: inherit !important; }
.ask__bubble { display: none; max-width: 80%; padding: 20px 26px; font: 400 16px/1.7 'Open Sans', Arial, sans-serif; color: #3c4741; border-radius: 24px 24px 6px 24px; background: #fff; border-right: 5px solid var(--c); box-shadow: 0 16px 28px -18px rgba(40, 30, 20, .55); transform-origin: 100% 100%; }
.ask__item.is-open .ask__bubble { display: block; animation: ask-in .5s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes ask-in { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }
/* closer paragraphs and lists with their dots (the client's notes of 2026-11-05: too much room between the paragraphs;
   the empty ones are left out in mch_tidy_html()) */
.ask__bubble { line-height: 1.6; }
/* room for the rounded bottom and the shadow of the answer (it looked cut off flat) */
.ask__item.is-open .ask__in { padding-bottom: 18px; }
.ask .ask__bubble p { margin: 0 0 8px; }
.ask .ask__bubble ul, .ask .ask__bubble ol { margin: 0 0 8px; padding: 0 0 0 20px; }
.ask .ask__bubble li { position: relative; margin: 0 0 4px; padding: 0; list-style: none; }
.ask .ask__bubble li::before { content: ''; position: absolute; left: -15px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.ask .ask__bubble > :last-child, .ask .ask__bubble li:last-child { margin-bottom: 0; }

/* ---------- Smaller screens ---------- */
@media only screen and (max-width: 768px) {
	.ask__marks i:nth-child(n+9) { display: none; }
	.ask__q { max-width: 100%; gap: 8px; }
	.ask__who { width: 36px; height: 36px; font-size: 22px; }
	.ask__text { padding: 13px 16px; font-size: 15px; }
	.ask__house { width: 40px; height: 40px; }
	.ask__bubble { max-width: calc(100% - 52px); padding: 16px 18px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
	.ask *, .ask *::before, .ask *::after { animation: none !important; transition: none !important; }
	.ask__item { opacity: 1 !important; transform: none !important; }
	.ask__marks { display: none; }
}
