/* MTDM - Mots croises */
.mtdm-mc
    {
    --mc-cell: min(36px, calc((100vw - 56px) / var(--mc-cols, 11)));
    max-width: 100%;
    }
.mtdm-mc .mc-title { margin: 0 0 2px; }
.mtdm-mc .mc-month { margin: 0 0 10px; color: #555; text-transform: capitalize; }

.mtdm-mc .mc-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mtdm-mc .mc-tab
    {
    padding: 6px 14px;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    color: #222;
    cursor: pointer;
    font: inherit;
    }
.mtdm-mc .mc-tab-on { background: #1f4e79; border-color: #1f4e79; color: #fff; }

.mtdm-mc .mc-board
    {
    --mc-cell: min(36px, calc((100vw - 56px) / var(--mc-cols, 11)));
    display: grid;
    grid-template-columns: repeat(var(--mc-cols, 11), var(--mc-cell));
    grid-auto-rows: var(--mc-cell);
    gap: 0;
    width: max-content;
    max-width: 100%;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    }
.mtdm-mc .mc-head
    {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    color: #1f4e79;
    background: #eef3f8;
    border: 1px solid #c5d3e0;
    }
.mtdm-mc .mc-block { background: #111; border: 1px solid #111; }
.mtdm-mc .mc-cell
    {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid #555;
    background: #fff;
    color: #111;
    font-size: calc(var(--mc-cell) * 0.55);
    font-weight: bold;
    cursor: pointer;
    }
.mtdm-mc .mc-cell.mc-word { background: #dbe8f5; }
.mtdm-mc .mc-cell.mc-sel { background: #ffe680; }
.mtdm-mc .mc-cell.mc-wrong { background: #f9c6c6; color: #a00000; }
.mtdm-mc .mc-cell.mc-solved { background: #dff2df; cursor: default; }

.mtdm-mc .mc-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.mtdm-mc .mc-btn
    {
    padding: 8px 16px;
    border: 1px solid #1f4e79;
    border-radius: 4px;
    background: #1f4e79;
    color: #fff;
    cursor: pointer;
    font: inherit;
    }
.mtdm-mc .mc-btn-alt { background: #fff; color: #1f4e79; }
.mtdm-mc .mc-msg { min-height: 1.4em; margin: 4px 0 8px; }
.mtdm-mc .mc-msg.mc-ok { color: #1a7a1a; font-weight: bold; }
.mtdm-mc .mc-msg.mc-err { color: #a00000; }

/* Hidden field that receives the keyboard, also on phones. */
.mtdm-mc .mc-input
    {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: 0;
    padding: 0;
    font-size: 16px;
    }

.mtdm-mc .mc-clues { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 8px; }
.mtdm-mc .mc-clues-col { flex: 1 1 280px; min-width: 0; }
.mtdm-mc .mc-clues-col h4 { margin: 8px 0 6px; }
.mtdm-mc .mc-group { display: grid; grid-template-columns: 2.6em 1fr; gap: 2px 0; margin: 4px 0; }
.mtdm-mc .mc-label { grid-column: 1; grid-row: 1; font-weight: bold; color: #1f4e79; }
.mtdm-mc .mc-clue { grid-column: 2; justify-self: start; cursor: pointer; padding: 1px 6px; border-radius: 3px; }
.mtdm-mc .mc-clue:hover { background: #eef3f8; }
.mtdm-mc .mc-clue-on { background: #dbe8f5; }
.mtdm-mc-archive { margin-top: 4px; }
