/*
 * Clock & Telling Time Worksheets – V3.0 (Premium 2026)
 * Modes: Read, Draw, Elapsed, Matching, Before/After, Blank
 * Aligned with worksheet-base.css design system
 */

/* =========================================
   1. CLOCK GRID LAYOUT
   ========================================= */
.clock-grid {
    display: grid;
    gap: 6mm;
    width: 100%;
    flex: 1 1 auto;
    align-content: start;
    padding-top: 2mm;
}

.clock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2mm;
    padding: 3mm;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    page-break-inside: avoid;
}

.clock-number {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    align-self: flex-start;
}

/* =========================================
   2. SVG CLOCK
   ========================================= */
.clock-svg-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-svg-wrap svg {
    width: 100%;
    max-width: 100px;
    height: auto;
}

.clock-size-small .clock-svg-wrap svg {
    max-width: 70px;
}

.clock-size-medium .clock-svg-wrap svg {
    max-width: 100px;
}

.clock-size-large .clock-svg-wrap svg {
    max-width: 140px;
}

/* =========================================
   2b. ELAPSED TIME LAYOUT
   ========================================= */
.elapsed-pair {
    display: flex;
    align-items: center;
    gap: 3mm;
    justify-content: center;
}

.elapsed-arrow {
    font-size: 24px;
    font-weight: 900;
    color: #6366f1;
}

.elapsed-pair .clock-svg-wrap svg {
    max-width: 80px;
}

.clock-size-large .elapsed-pair .clock-svg-wrap svg {
    max-width: 110px;
}

/* =========================================
   2c. MATCHING MODE
   ========================================= */
.matching-grid {
    display: flex;
    flex-direction: column;
    gap: 4mm;
    width: 100%;
    flex: 1 1 auto;
    padding-top: 2mm;
}

.matching-row {
    display: flex;
    align-items: center;
    gap: 4mm;
    padding: 2mm 3mm;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.matching-clock {
    flex: 0 0 auto;
}

.matching-clock svg {
    max-width: 70px;
    height: auto;
}

.clock-size-large .matching-clock svg {
    max-width: 100px;
}

.matching-dot {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 2px solid #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #6366f1;
    font-family: 'Nunito', sans-serif;
}

.matching-time {
    flex: 1;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    text-align: right;
}

/* =========================================
   2d. BEFORE/AFTER QUESTION
   ========================================= */
.clock-question {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
    text-align: center;
    font-style: italic;
    margin-top: 1mm;
}

/* =========================================
   2e. INSTRUCTION TEXT
   ========================================= */
.instruction-text {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-align: center;
    padding: 6px 16px;
    border-bottom: 1px dashed #ccc;
    font-style: italic;
}

/* =========================================
   3. LABELS & ANSWER LINES
   ========================================= */
.clock-answer-line {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-top: 1mm;
}

.clock-time-label {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.5px;
}

/* =========================================
   4. ANSWER KEY
   ========================================= */
.answer-key-list {
    column-count: 3;
    column-gap: 8mm;
    width: 100%;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    color: #374151;
    margin-top: 4mm;
}

.answer-key-row {
    break-inside: avoid;
    margin-bottom: 3px;
}

.answer-num {
    font-weight: 700;
    color: #111827;
    display: inline-block;
    min-width: 22px;
}

/* =========================================
   5. PRINT OVERRIDES
   ========================================= */
@media print {
    .clock-item {
        border-color: #ccc !important;
    }

    .clock-svg-wrap svg circle,
    .clock-svg-wrap svg line,
    .clock-svg-wrap svg text {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .clock-svg-wrap svg circle {
        stroke: #1f2937 !important;
    }

    .clock-svg-wrap svg line {
        stroke: #000 !important;
    }

    .clock-number,
    .clock-answer-line,
    .clock-time-label {
        color: #000 !important;
    }

    .elapsed-arrow {
        color: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .instruction-text {
        color: #333 !important;
        border-bottom-color: #999 !important;
    }

    .matching-row {
        border-color: #ccc !important;
    }

    .matching-dot {
        border-color: #333 !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .matching-time {
        color: #000 !important;
    }

    .clock-question {
        color: #333 !important;
    }
}