/* ============================================
   TABULKY - MAPA SKŘÍNĚK
   Verze: 7.0
   ============================================ */

/* === ZÁKLADNÍ STYLY TABULKY === */
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

/* === BUŇKY TABULKY === */
td {
    border: 1px solid var(--border-color);
    padding: 0;
    position: relative;
    width: var(--col-width);
    height: var(--cell-height);
    min-height: var(--cell-height);
    background: #fff;
    transition: background 0.2s ease;
    vertical-align: middle;
}

/* === ODKAZ NA BUŇKU === */
.cell-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cell-link:hover {
    background: rgba(74, 144, 217, 0.05);
}

/* === OBSAH BUNĚK === */
.cell-content {
    display: block;
    width: 100%;
    height: 100%;
    padding: var(--spacing-sm);
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    font-size: clamp(
        calc(var(--font-size-base) * 0.5),
        1.5vw,
        calc(var(--font-size-base) * 2)
    );
    line-height: 1.2;
}

/* === ČÍSLO BUNĚK V PRAVÉM ROHU === */
.cell-number {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.7em;
    color: var(--text-muted);
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
    background: rgba(255, 255, 255, 0.8);
    padding: 1px 3px;
    border-radius: var(--border-radius-small);
}

/* === PRÁZDNÉ BUNĚKY === */
.empty-cell {
    background: #f0f0f0 !important;
    cursor: pointer;
}

.empty-cell:hover {
    background: #e0e0e0 !important;
}

/* === RESPONZIVITA === */
@media (max-width: 900px) {
    .cell-content {
        font-size: clamp(
            calc(var(--font-size-base) * 0.5),
            2vw,
            calc(var(--font-size-base) * 2)
        );
    }

    .cell-number {
        font-size: 0.6em;
        top: 1px;
        right: 3px;
    }
}

@media (max-width: 480px) {
    td {
        height: auto;
        min-height: 60px;
    }

    .cell-content {
        font-size: clamp(
            calc(var(--font-size-base) * 0.5),
            3vw,
            calc(var(--font-size-base) * 2)
        );
        padding: var(--spacing-xs);
    }

    .cell-number {
        font-size: 0.5em;
        top: 1px;
        right: 2px;
    }
}