/* Chinese Sentence of the Day — sentence card, word chips, the cover and the order tiles.
   Shares the card, option, progress and spark styles in wordoftheday.css. */

.sotd-sentence {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    line-height: 1.5;
}

.sotd-word {
    border-radius: .35rem;
    transition: background-color .15s ease;
}

.sotd-word:hover {
    background: rgba(13, 110, 253, .12);
}

.sotd-pinyin {
    color: #0d6efd;
    font-size: 1.1rem;
}

.sotd-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 3rem;
    padding: .35rem .6rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    color: inherit;
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1.2;
}

.sotd-chip small {
    color: var(--bs-secondary-color);
    font-size: .75rem;
}

a.sotd-chip:hover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, .06);
}

/* Covered while the check runs, so the answers are not on screen. */
.sotd-coverable {
    transition: filter .35s ease, opacity .35s ease;
}

.sotd-coverable.is-covered {
    filter: blur(9px);
    opacity: .55;
    pointer-events: none;
    user-select: none;
}

.sotd-line,
.sotd-tray {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    min-height: 3.4rem;
    padding: .5rem;
    border-radius: .6rem;
}

.sotd-line {
    border: 2px dashed var(--bs-border-color);
    margin-bottom: .75rem;
    transition: border-color .2s ease, background-color .2s ease;
}

.sotd-line.is-correct {
    border-style: solid;
    border-color: #198754;
    background: rgba(25, 135, 84, .08);
}

.sotd-line.is-wrong {
    border-style: solid;
    border-color: #dc3545;
    background: rgba(220, 53, 69, .06);
}

.sotd-tile {
    padding: .4rem .75rem;
    border: 1px solid #0d6efd;
    border-radius: .5rem;
    background: var(--bs-body-bg);
    color: inherit;
    font-size: 1.35rem;
    box-shadow: 0 .15rem .35rem rgba(13, 110, 253, .15);
}

.sotd-tile:hover {
    background: rgba(13, 110, 253, .08);
}

.sotd-pop {
    animation: sotd-pop 220ms ease-out;
}

@keyframes sotd-pop {
    from { transform: scale(.8); }
    60% { transform: scale(1.08); }
    to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .sotd-pop { animation: none; }
    .sotd-coverable { transition: none; }
}

[data-bs-theme="dark"] .sotd-pinyin {
    color: #6ea8fe;
}
