/*
 * Crossword Puzzle Maker – V1.0 (Premium 2026)
 * Grid, clue, and print styles
 * Aligned with worksheet-base.css design system
 */

/* =========================================
   1. CROSSWORD GRID
   ========================================= */
.crossword-grid {
    display: grid;
    justify-content: center;
    margin: 4mm auto 6mm;
    gap: 0;
}

.cw-cell {
    position: relative;
    border: 1px solid #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: #fff;
}

.cw-cell.cw-black {
    background: #111827;
    border-color: #111827;
}

.cw-num {
    position: absolute;
    top: 1px;
    left: 2px;
    font-family: 'Nunito', sans-serif;
    font-size: 7px;
    font-weight: 700;
    color: #374151;
    line-height: 1;
}

.cw-letter {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
}

/* =========================================
   2. CLUES SECTION
   ========================================= */
.cw-clues {
    display: flex;
    gap: 10mm;
    width: 100%;
    margin-top: 6mm;
    flex: 1 1 auto;
}

.cw-clue-column {
    flex: 1;
}

.cw-clue-title {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #111827;
    padding-bottom: 2px;
    margin-bottom: 4px;
}

.cw-clue-row {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    line-height: 1.6;
    color: #374151;
}

.cw-clue-num {
    font-weight: 700;
    color: #111827;
    min-width: 18px;
    display: inline-block;
}

/* =========================================
   3. PRINT OVERRIDES
   ========================================= */
@media print {

    .crossword-grid,
    .cw-cell,
    .cw-cell.cw-black {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cw-cell.cw-black {
        background: #000 !important;
    }

    .cw-clue-row,
    .cw-clue-title,
    .cw-clue-num {
        color: #000 !important;
    }

    .cw-unplaced-note {
        display: none !important;
    }
}

/* =========================================
   4. UNPLACED WORDS WARNING
   ========================================= */
.cw-unplaced-note {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    color: #92400e;
    background: #fef3c7;
    padding: 3mm 4mm;
    border-radius: 3px;
    text-align: center;
    margin-top: 4mm;
}