/* Wochenschichten Timeline Editor */

.bereich-editor {
    margin-bottom: 40px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.bereich-editor-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
}

.timeline-container {
    display: flex;
    background: var(--surface-color);
}

.timeline-hours {
    width: 80px;
    background: var(--bg-color);
    border-right: 2px solid var(--border-color);
    flex-shrink: 0;
}

.timeline-hour {
    height: 60px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.timeline-days {
    flex: 1;
    display: flex;
}

.timeline-day {
    flex: 1;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.timeline-day:last-child {
    border-right: none;
}

.timeline-day-header {
    background: var(--bg-color);
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 5;
    height: 66px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.timeline-hour-header {
    background: var(--bg-color);
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    border-bottom: 2px solid var(--border-color);
    height: 66px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-slots {
    position: relative;
}

.timeline-slot {
    height: 30px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.1s;
}

.timeline-slot:nth-child(even) {
    border-bottom-style: dashed;
    border-bottom-color: #e2e8f0;
}

.timeline-slot:hover {
    background: rgba(37, 99, 235, 0.05);
}

.timeline-slot.selecting {
    background: rgba(37, 99, 235, 0.2);
}

.timeline-shift {
    position: absolute;
    background: var(--primary-color);
    border-radius: 6px;
    padding: 6px 8px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Position wird dynamisch per JavaScript gesetzt für Überlappungen */
}

.timeline-shift:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    z-index: 10;
}

.timeline-shift-name {
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-shift-time {
    font-size: 10px;
    opacity: 0.9;
}

.timeline-shift-info {
    font-size: 10px;
    opacity: 0.85;
    margin-top: 2px;
}

.shift-copy-btn {
    position: absolute;
    top: 2px;
    right: 24px;
    background: rgba(16, 185, 129, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.shift-delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.timeline-shift:hover .shift-copy-btn,
.timeline-shift:hover .shift-delete-btn {
    display: flex;
}

.shift-copy-btn:hover {
    background: #10b981;
}

.shift-delete-btn:hover {
    background: var(--danger-color);
}
