/* GitHub-Style Activity Graph für Autoren */
.activity-graph {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.activity-months {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-left: 25px; /* Platz für Wochentag-Labels */
}

.month-label {
    font-size: 11px;
    color: #666;
    flex: 1;
    text-align: center;
}

.activity-grid {
    display: flex;
}

.weekday-labels {
    display: flex;
    flex-direction: column;
    width: 20px;
    margin-right: 5px;
}

.weekday-label {
    height: 11px;
    font-size: 9px;
    color: #666;
    line-height: 11px;
    margin-bottom: 2px;
}

.activity-squares {
    display: grid;
    grid-template-columns: repeat(53, 1fr); /* ~53 Wochen im Jahr */
    grid-template-rows: repeat(7, 1fr); /* 7 Wochentage */
    grid-auto-flow: column;
    gap: 2px;
    flex: 1;
}

.activity-square {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background-color: #ebedf0;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
}

.activity-square:hover {
    transform: scale(1.2);
    border: 1px solid #28a745;
    z-index: 10;
}

.activity-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
    gap: 3px;
}

.legend-text {
    font-size: 11px;
    color: #666;
    margin: 0 3px;
}

.legend-square {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background-color: #ebedf0;
}

/* Tooltip für Activity Squares */
.activity-square[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1b1f23;
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.activity-square[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1b1f23;
    z-index: 1000;
    pointer-events: none;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .activity-graph {
        padding: 10px;
    }

    .activity-squares {
        grid-template-columns: repeat(26, 1fr); /* Nur 6 Monate auf mobil */
    }

    .activity-square {
        width: 8px;
        height: 8px;
    }

    .month-label {
        font-size: 10px;
    }

    .weekday-label {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .activity-squares {
        grid-template-columns: repeat(13, 1fr); /* Nur 3 Monate auf sehr kleinen Bildschirmen */
    }

    .activity-square {
        width: 7px;
        height: 7px;
    }
}
