/* The look every exercise with a place shares (taaltaal-scene.js): the tabs, the paper card with the place set into it, the
   buttons, the pop of "Goed!", the dots of a round, the hello of who reads out loud. An exercise puts the class tts-exercise on
   itself and has its own file for what is its own. The same look as the clock and the prepositions */
.tts-exercise { display: block; max-width: 720px; font: 15px/1.45 Arial, Verdana, sans-serif; color: #333; }
.tts-exercise [hidden] { display: none !important; }
.tts-exercise button:focus-visible { outline: 2px solid #2b3f93; outline-offset: 2px; }
.tts-exercise .tts-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }

.tts-exercise .tts-tabs { display: flex; gap: 4px; margin-left: 0; }     /* the first tab on the card's left edge */
.tts-exercise .tts-tabs button { padding: 6px 16px 7px; border: 1px solid #e6cfa8; border-bottom: 0; border-radius: 12px 12px 0 0;
        background: linear-gradient(#faefdc, #f0dcbd); color: #8a6c48; font: inherit; font-weight: bold; cursor: pointer; white-space: nowrap; }
/* the open tab is of the same paper as the card under it, and runs into it: tab and card are one sheet */
.tts-exercise .tts-tabs button[aria-selected="true"] { position: relative; z-index: 2; margin-bottom: -1px; padding-bottom: 8px; color: #5a3a17;
        background: #fdf6ec url("/images/kennis/paper.png"); border-color: rgba(120, 95, 60, .18); }

.tts-exercise .tts-card { position: relative; padding: 18px 20px 20px; border-radius: 0 10px 10px 10px; background: #fdf6ec url("/images/kennis/paper.png");
        border: 1px solid rgba(120, 95, 60, .18); box-shadow: 0 2px 7px rgba(60, 45, 20, .14); }
/* the place set into the paper, an inset around it */
.tts-exercise .tts-scene { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(60, 45, 20, .15); }
.tts-exercise .tts-scene::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
        box-shadow: inset 0 2px 6px rgba(40, 25, 10, .45), inset 0 -3px 7px rgba(40, 25, 10, .4), inset 0 0 0 1px rgba(40, 25, 10, .25); }
.tts-exercise .place { display: block; width: 100%; height: auto; touch-action: manipulation; }
.tts-exercise .place .hit { fill: transparent; }
.tts-exercise .place .seam { stroke: #8a5a2e; stroke-width: 1; opacity: .35; }
.tts-exercise .place .bo-at { transform-box: view-box; transform-origin: 0 0; transition: transform .45s cubic-bezier(.3, 1.35, .5, 1);
        filter: drop-shadow(0 3px 3px rgba(40, 30, 10, .25)); }

.tts-exercise .tts-side { margin-top: 14px; min-height: 120px; }
.tts-exercise .tts-tip { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 13.5px; font-weight: bold;
        color: #c70765; text-align: center; }
.tts-exercise .tts-tip .ico { flex: none; width: 20px; height: 20px; }
.tts-exercise .tts-play { display: inline-flex; align-items: center; margin: 0; padding: 7px 16px 8px; border: 0; border-radius: 18px; cursor: pointer;
        background: linear-gradient(#ee3399, #cd1269); color: #fff; font: inherit; font-weight: bold; box-shadow: 0 2px 4px rgba(150, 10, 80, .3); }
.tts-exercise .tts-play::before { content: ""; display: inline-block; margin-right: 8px; border-left: 9px solid #fff;
        border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

.tts-exercise .tts-ask { margin: 0 0 10px; font-size: 18px; font-weight: bold; color: #2b3f93; }
.tts-exercise .tts-answers { display: grid; grid-template-columns: 1fr; gap: 7px; }
.tts-exercise .tts-answers button { padding: 10px 14px; text-align: left; border: 1px solid #dcd6c8; border-radius: 8px; background: #fff;
        font: inherit; font-size: 16px; color: #333; cursor: pointer; box-shadow: 0 1px 2px rgba(60, 45, 20, .1); }
.tts-exercise .tts-answers button:hover:not(:disabled) { box-shadow: 0 3px 6px rgba(60, 45, 20, .16); }
.tts-exercise .tts-answers button:disabled { cursor: default; opacity: .7; }
.tts-exercise .tts-answers button.right { opacity: 1; border-color: #393; background: #ecf8ea; color: #1f6b1f; font-weight: bold; }
.tts-exercise .tts-answers button.wrong { opacity: 1; border-color: #c70765; background: #fdeef4; color: #a0054f; }

.tts-exercise .tts-feedback { display: flow-root; }       /* its first margin stays inside, so a min-height holds */
.tts-exercise .tts-feedback p { margin: 10px 0 0; }
.tts-exercise .tts-bad { color: #a0054f; }
/* why: a yellow note */
.tts-exercise .tts-why { font-size: 13.5px; color: #6b5a40; background: #fdf6a3; padding: 7px 10px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tts-exercise .tts-score { font-size: 16px; }
.tts-exercise .tts-next { margin-top: 12px; padding: 8px 18px; border: 0; border-radius: 8px; background: linear-gradient(#4a5fb0, #2b3f93);
        color: #fff; font: inherit; font-weight: bold; cursor: pointer; }

.tts-exercise .tts-pop { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
        pointer-events: none; animation: tts-pop 1.6s ease-out forwards; }
.tts-exercise .tts-pop b { font-size: 58px; color: #2f9a2f; text-shadow: 0 0 2px #fff, 0 0 12px #fff, 0 3px 10px rgba(40, 90, 40, .35); }
.tts-exercise .tts-pop span { margin-top: 2px; padding: 0 12px; font-size: 22px; font-weight: bold; color: #2b3f93; text-align: center; text-shadow: 0 0 2px #fff, 0 0 10px #fff; }
@keyframes tts-pop { 0% { opacity: 0; transform: scale(.5); } 15% { opacity: 1; transform: scale(1.05); } 65% { opacity: 1; transform: scale(1.1); }
                     100% { opacity: 0; transform: scale(1.3); } }

.tts-exercise .tts-progress { display: flex; gap: 6px; justify-content: center; margin: 12px 0 0; padding: 0; list-style: none; }
.tts-exercise .tts-progress li { width: 10px; height: 10px; border-radius: 50%; background: #e2ddd2; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .15); }
.tts-exercise .tts-progress li.right { background: #393; }
.tts-exercise .tts-progress li.wrong { background: #c70765; }

/* the hello of who reads out loud: her photo is in the place; the button is it for the keyboard, out of sight; the card a
   balloon with a point to her photo on its right (under it on a phone, the point up) */
.tts-exercise .tts-narrator { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.tts-exercise .tts-hello { position: absolute; right: 134px; top: 6px; z-index: 3; width: 270px; padding: 14px 16px 12px; border-radius: 14px;
        background: linear-gradient(120deg, #fff 0%, #f4f7fd 60%, #e8eefb 100%); border: 1px solid #d6dff0; box-shadow: 0 8px 22px rgba(43, 63, 147, .22); }
.tts-exercise .tts-hello::after { content: ""; position: absolute; right: -8px; top: 58px; width: 14px; height: 14px;
        background: #e9effb; border: solid #d6dff0; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.tts-exercise .tts-hello-text { margin: 0 24px 0 0; font-size: 15px; line-height: 1.45; }
.tts-exercise .tts-hello-in { margin: 8px 0 0; font-size: 13px; color: #888; font-style: italic; }
.tts-exercise .tts-close { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
        cursor: pointer; background: #efe9de; color: #5a4a35; font-size: 18px; font-weight: bold; line-height: 25px; }

/* building a sentence (TaalTaalScene.arrange): a piece can be dragged, so a finger on it does not scroll the page; the one
   being dragged floats above the rest, and the caret shows where it will land. Its colour says what it does in the sentence
   (data-tts-colors on <html>: color, safe, pattern or off, chosen under the pieces) */
.tts-exercise [data-arrange] > button { touch-action: none; cursor: grab; }
.tts-exercise [data-arrange] > button.tts-dragging { position: relative; z-index: 5; cursor: grabbing; pointer-events: none;
        box-shadow: 0 8px 16px rgba(60, 45, 20, .28); }
.tts-exercise .tts-caret { align-self: stretch; width: 3px; min-height: 30px; border-radius: 2px; background: #73d2f7; }
/* the looks of the parts (TaalTaalScene.legend): the same on the piece and on its little square in the key */
:root[data-tts-colors="color"] .tts-exercise [data-arrange] > button[data-role="verb"]:not(.right):not(.wrong), :root[data-tts-colors="color"] .tts-exercise .tts-legend [data-role="verb"]::before { border-color: #4a78c2; background: linear-gradient(#e6effd, #c9dcf7); color: #1d3f86; box-shadow: 0 2px 0 #4a78c2; }
:root[data-tts-colors="color"] .tts-exercise [data-arrange] > button[data-role="subject"]:not(.right):not(.wrong), :root[data-tts-colors="color"] .tts-exercise .tts-legend [data-role="subject"]::before { border-color: #3f8f6b; background: linear-gradient(#e7f6ec, #c8e8d3); color: #1f5e40; box-shadow: 0 2px 0 #3f8f6b; }
:root[data-tts-colors="color"] .tts-exercise [data-arrange] > button[data-role="part"]:not(.right):not(.wrong), :root[data-tts-colors="color"] .tts-exercise .tts-legend [data-role="part"]::before { border-color: #c70765; background: linear-gradient(#fdeaf3, #f8cde2); color: #a0054f; box-shadow: 0 2px 0 #c70765; }
/* colour-blind: blue, orange and reddish purple (after Okabe and Ito), which stay apart in every common kind */
:root[data-tts-colors="safe"] .tts-exercise [data-arrange] > button[data-role="verb"]:not(.right):not(.wrong), :root[data-tts-colors="safe"] .tts-exercise .tts-legend [data-role="verb"]::before { border-color: #0072b2; background: linear-gradient(#e3f0fa, #c3def2); color: #00527f; box-shadow: 0 2px 0 #0072b2; }
:root[data-tts-colors="safe"] .tts-exercise [data-arrange] > button[data-role="subject"]:not(.right):not(.wrong), :root[data-tts-colors="safe"] .tts-exercise .tts-legend [data-role="subject"]::before { border-color: #c98a00; background: linear-gradient(#fdf1d6, #f6d896); color: #6b4800; box-shadow: 0 2px 0 #c98a00; }
:root[data-tts-colors="safe"] .tts-exercise [data-arrange] > button[data-role="part"]:not(.right):not(.wrong), :root[data-tts-colors="safe"] .tts-exercise .tts-legend [data-role="part"]::before { border-color: #b4648f; background: linear-gradient(#f9e8f1, #efcadf); color: #7d3360; box-shadow: 0 2px 0 #b4648f; }
/* hatched: no colour at all, the wood with a pattern and a border of its own: lines for the verb, dots for who does it,
   stripes across for the little part */
:root[data-tts-colors="pattern"] .tts-exercise [data-arrange] > button[data-role="verb"]:not(.right):not(.wrong), :root[data-tts-colors="pattern"] .tts-exercise .tts-legend [data-role="verb"]::before { border: 2px solid #2b3f93; color: #1d2b6e; box-shadow: none;
        background: repeating-linear-gradient(45deg, rgba(43, 63, 147, .22) 0 2px, transparent 2px 7px), linear-gradient(#f8e3bd, #e9c48c); }
:root[data-tts-colors="pattern"] .tts-exercise [data-arrange] > button[data-role="subject"]:not(.right):not(.wrong), :root[data-tts-colors="pattern"] .tts-exercise .tts-legend [data-role="subject"]::before { border: 2px dashed #2b3f93; color: #1d2b6e; box-shadow: none;
        background: radial-gradient(rgba(43, 63, 147, .3) 1.3px, transparent 1.6px) 0 0 / 7px 7px, linear-gradient(#f8e3bd, #e9c48c); }
:root[data-tts-colors="pattern"] .tts-exercise [data-arrange] > button[data-role="part"]:not(.right):not(.wrong), :root[data-tts-colors="pattern"] .tts-exercise .tts-legend [data-role="part"]::before { border: 2px dotted #2b3f93; color: #1d2b6e; box-shadow: none;
        background: repeating-linear-gradient(0deg, rgba(43, 63, 147, .22) 0 2px, transparent 2px 6px), linear-gradient(#f8e3bd, #e9c48c); }
.tts-exercise .tts-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; margin: 10px 0 0; font-size: 12.5px;
        color: #8a7a5a; }
:root[data-tts-colors="off"] .tts-exercise .tts-legend [data-role] { display: none; }
.tts-exercise .tts-legend span[data-role]::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 5px; border: 1px solid; border-radius: 3px;
        vertical-align: -2px; box-sizing: border-box; box-shadow: none; }
:root[data-tts-colors] .tts-exercise .tts-legend span[data-role]::before { box-shadow: none; }     /* the square of the key lies flat */
.tts-exercise .tts-looks { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding-left: 14px; border-left: 1px solid #e3d9c4; }
:root[data-tts-colors="off"] .tts-exercise .tts-looks { margin-left: 0; padding-left: 0; border-left: 0; }
.tts-exercise .tts-looks select { padding: 2px 6px; border: 1px solid #dcd6c8; border-radius: 10px; background: #fff; font: inherit; color: #5b4a30; cursor: pointer; }

/* the chat of a conversation (Aan de bar, Maandagochtend, Het gesprek...), the same in every exercise: set into the paper as
   an inset, so it is clearly a window of its own; it scrolls inside, the newest line at the bottom */
.tts-exercise .tts-chat { padding: 13px 10px 8px; border-radius: 10px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(120, 95, 60, .2);
        box-shadow: inset 0 2px 5px rgba(60, 45, 20, .16), inset 0 -1px 3px rgba(60, 45, 20, .08); }
/* a long tab label has a short one for a phone (TaalTaalScene.tab): Bouw de zin, Bouwen */
.tts-tab-short { display: none; }
@media (max-width: 560px) { .tts-tab-long { display: none; } .tts-tab-short { display: inline; } }
/* the icon of a tab's step (TaalTaalScene.tabIcon), in every exercise the same: a flat line in the colour of the tab's text;
   on a wide screen only, a phone has no room */
.tts-tab-ico { display: none; }
@media (min-width: 561px)
{
    .tts-tab-ico { display: inline-block; width: 17px; height: 17px; margin: 0 3.5px 0 -2px; vertical-align: -3px; fill: none; stroke: currentColor;
                   stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}

@media (max-width: 560px)
{
    .tts-exercise .tts-card { padding: 12px; }
    .tts-exercise .tts-tabs button { padding: 6px 9px 7px; font-size: 13px; }
    .tts-exercise .tts-hello { left: 8px; right: 8px; width: auto; top: 86px; }
    .tts-exercise .tts-hello::after { right: 30px; top: -8px; background: #eaf0fb; border-width: 1px 0 0 1px; }
}
@media (prefers-reduced-motion: reduce)
{
    .tts-exercise .place .bo-at { transition: none; }
    .tts-exercise .tts-pop { animation: none; }
}

/* The end of a round of questions (taaltaal-end.js), the same in every exercise, in the room of the question: an icon, the
   idiom that says how it went, what it means; the party gets a burst of confetti from behind the crown, the road a route, a
   bad round a leaf that grows and a warm word */
.tts-end { position: relative; padding-top: 22px; text-align: center; }
.tts-end-grow { padding-top: 12px; }     /* it has the comfort too: a little higher */
.tts-end-ico { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%;
        background: #fff; box-shadow: 0 2px 6px rgba(60, 45, 20, .14); animation: tts-end-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.tts-end-ico .ico { width: 36px; height: 36px; }
.tts-end-party .tts-end-ico { background: linear-gradient(#fff6d6, #fde58a); }
.tts-end-grow .tts-end-ico { background: linear-gradient(#f1faee, #d3eecb); }
.tts-end-grow .tts-end-ico .ico { transform-origin: 50% 90%; animation: tts-end-grow 1.4s ease-out .2s both; }
.tts-end-idiom { margin: 10px 0 0; font-size: 24px; font-weight: bold; color: #2b3f93; line-height: 1.35; }
.tts-end-en { margin: 4px 0 0; font-size: 13px; color: #8a8a8a; font-style: italic; }
.tts-end-means { margin: 6px auto 0; max-width: 440px; font-size: 14.5px; color: #6b5a40; }
.tts-end-comfort { margin: 8px auto 0; max-width: 440px; font-size: 14.5px; color: #3d6b35; }
.tts-end-bit { position: absolute; left: 50%; top: 38px; width: 8px; height: 12px; margin: -6px 0 0 -4px; border-radius: 2px; pointer-events: none; }
@keyframes tts-end-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tts-end-grow { from { transform: scale(.2) rotate(-20deg); } 60% { transform: scale(1.08) rotate(4deg); } to { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) {
    .tts-end-ico, .tts-end-grow .tts-end-ico .ico { animation: none; }
}

/* who speaks, when several people are in the picture (.xxx-who.talking): the white edge of their round picture turns pink,
   with a soft ring round it; it takes no room, so nothing moves. The mouth alone was too little to see it by */
[class*="-who"].talking > svg { border-color: #c70765; box-shadow: 0 0 0 3px rgba(199, 7, 101, .3), 0 2px 6px rgba(60, 45, 20, .25); }

/* the end of a conversation or a round in the room it had (TaalTaalEnd in taaltaal-end.js), all of it in the middle */
.tts-exercise .tts-finale { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.tts-exercise .tts-finale .tts-end { width: 100%; padding-top: 0; }
.tts-exercise .tts-finale .tts-score { margin: 14px 0 0; }
.tts-exercise .tts-finale-go { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 0; }
.tts-exercise .tts-finale-go .tts-next { margin-top: 0; }
/* who reads out loud, on her polaroid in the place: her mouth moves with the sound */
.photo .mouth-open { opacity: 0; transform-box: fill-box; transform-origin: 50% 25%; }
/* who speaks in a place, Bo or anyone in the café: the same soft pink glow */
.bo-saying .bo, .talking > .bo, .place .who.talking { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px rgba(199, 7, 101, .9)); }
/* ringing at a front door (TaalTaalScene.frontDoor): ding-dong at once, a moment of nothing, the light behind the glass goes
   on, and the door opens just before the first words, about three seconds after the bell */
.tts-exercise li.tts-doorway { position: absolute; inset: 0; display: grid; place-items: center; max-width: none; padding: 6px; border: 0; border-radius: 0;
        background: none; box-shadow: none; animation: none; pointer-events: none; }
.tts-exercise .tts-door { display: block; height: min(210px, 100%); max-width: 100%; animation: tts-door-in .18s ease-out; }
@keyframes tts-door-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.tts-exercise .tts-door text { font-family: Arial, Verdana, sans-serif; font-weight: bold; }
.tts-exercise .tts-door-name { font-size: 10.5px; fill: #3a2c1a; }
.tts-exercise .tts-door-mat { font-size: 7.5px; letter-spacing: 1px; fill: #e8dcc0; }
.tts-exercise .tts-door .mouth-open { display: none; }
.tts-exercise .tts-door-glass { fill: #7f9fb3; animation: tts-door-lamp .25s ease 1.55s forwards; }
@keyframes tts-door-lamp { to { fill: #ffe7a6; } }
.tts-exercise .tts-door-leaf { transform-box: fill-box; transform-origin: 0 50%; animation: tts-door-open .5s ease-in-out 2.35s forwards; }
@keyframes tts-door-open { to { transform: scaleX(.14) skewY(-9deg); } }
.tts-exercise .tts-door-press { transform-box: fill-box; transform-origin: center; animation: tts-door-press .42s ease-in-out 2; }
@keyframes tts-door-press { 0%, 100% { transform: none; } 30% { transform: scale(.65); } }
.tts-exercise .tts-door-wave { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: 0; animation: tts-door-wave .42s ease-out 3; }
.tts-exercise .tts-door-wave2 { animation-delay: .08s; }
@keyframes tts-door-wave { 0%, 100% { opacity: 0; } 30% { opacity: 1; } }
.tts-exercise .tts-door-ding { font-size: 15px; fill: #fff; paint-order: stroke; stroke: rgba(80, 35, 20, .8); stroke-width: 3px; stroke-linejoin: round; opacity: 0;
        transform-box: fill-box; transform-origin: 0 100%; animation: tts-door-ding 1.5s ease both; }
.tts-exercise .tts-door-dong { animation-delay: .42s; }
@keyframes tts-door-ding { 0% { opacity: 0; transform: scale(.7); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .tts-exercise .tts-door, .tts-exercise .tts-door-press, .tts-exercise .tts-door-wave, .tts-exercise .tts-door-ding { animation: none; }
    .tts-exercise .tts-door-ding { opacity: 1; }
}
