/* ── Treningskalender Ukesvisning ── */

.tk-uke-wrapper {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    box-sizing: border-box;
}

.tk-uke-wrapper.tk-laster {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Navigasjon ── */
.tk-uke-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tk-uke-nav-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}
.tk-uke-nav-btn:hover { background: #333; }

.tk-uke-idag-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 16px;
    height: 36px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.tk-uke-idag-btn:hover { background: #333; }

.tk-uke-periode {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ── Grid-wrapper: tidslinje + dager ── */
.tk-uke-grid-wrapper {
    display: flex;
    gap: 0;
    border: 1px solid #e0deda;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

/* ── Tidslinje venstre ── */
.tk-uke-tidslinje {
    width: 52px;
    flex-shrink: 0;
    background: #f5f4f0;
    border-right: 1px solid #e0deda;
    padding-top: 42px; /* header-høyde */
    box-sizing: border-box;
}

.tk-uke-time-label {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-right: 8px;
    padding-top: 4px;
    font-size: 11px;
    color: #999;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ── Dag-grid ── */
.tk-uke-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    min-width: 0;
}

.tk-uke-dag-col {
    border-right: 1px solid #e0deda;
    display: flex;
    flex-direction: column;
}
.tk-uke-dag-col:last-child { border-right: none; }

.tk-uke-dag-col.tk-uke-idag .tk-uke-dag-header {
    background: #D93B2B;
    color: #fff;
}

/* ── Dag-header ── */
.tk-uke-dag-header {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: lowercase;
    border-bottom: 1px solid #e0deda;
    background: #f5f4f0;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

/* ── Dag-innhold med timegrid ── */
.tk-uke-dag-innhold {
    position: relative;
    flex: 1;
}

.tk-uke-time-slot {
    height: 60px;
    border-bottom: 1px solid #f0ede8;
    box-sizing: border-box;
}
.tk-uke-time-slot:last-child { border-bottom: none; }

/* ── Aktivitetskort ── */
.tk-uke-aktivitet-kort {
    position: absolute;
    left: 3px;
    right: 3px;
    border-radius: 5px;
    padding: 5px 7px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: default;
    z-index: 1;
    min-height: 24px;
}

.tk-uke-akt-navn {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tk-uke-akt-tid {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.tk-uke-akt-instruktor {
    font-size: 11px;
    opacity: 0.75;
    margin-top: 2px;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Responsiv ── */
@media (max-width: 640px) {
    .tk-uke-tidslinje { width: 36px; }
    .tk-uke-time-label { font-size: 9px; padding-right: 4px; }
    .tk-uke-dag-header { font-size: 10px; }
    .tk-uke-akt-navn { font-size: 10px; }
    .tk-uke-akt-tid { display: none; }
}
