/* AbildskovUndervisning - abildskovundervisning.dk */
/* MUS - ORDJAGT */

.wordsearch-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: min(96vw, 900px);
    margin: 0 auto;
    padding: 4px;
    box-sizing: border-box;
}

.wordsearch-grid {
    --ws-cell: calc(min(var(--app-vh, 100vh) - 230px, 92vw - 220px, 480px) / var(--ws-size));
    display: grid;
    grid-template-columns: repeat(var(--ws-size), var(--ws-cell));
    grid-auto-rows: var(--ws-cell);
    gap: 2px;
    padding: 6px;
    border: 3px solid #770000;
    border-radius: 12px;
    background: #000000;
    user-select: none;
    flex: 0 0 auto;
}

.wordsearch-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #1a0000;
    color: #ff4d4d;
    font-weight: 700;
    font-size: calc(var(--ws-cell) * 0.5);
    cursor: pointer;
}

.wordsearch-cell.selected { background: #770000; color: #ffffff; }
.wordsearch-cell.found { background: #0a3300; color: #ffffff; }

.wordsearch-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 130px;
}

.wordsearch-word {
    display: flex;
    flex-direction: column;
    padding: 4px 12px;
    border: 2px solid #770000;
    border-radius: 10px;
    background: #1a0000;
    color: #ff4d4d;
}

.wordsearch-word-text { font-weight: 700; letter-spacing: 0.05em; }
.wordsearch-word-hint { font-size: 0.8rem; opacity: 0.8; color: #ffffff; }

.wordsearch-word.found { border-color: #4cd964; background: #0a3300; }
.wordsearch-word.found .wordsearch-word-text { text-decoration: line-through; color: #ffffff; }
