/* Timeline Manager - Frontend Styles */

.timeline-manager-wrapper {
    position: relative;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 60px 0 60px;
}

.timeline-container {
    overflow: hidden;
    position: relative;
    /* Verhindere horizontales Scrollen, aber clippe intelligent */
    width: 100%;
}

.timeline-track {
    display: flex;
    gap: 40px;
    transition: transform 0.3s ease;
    will-change: transform;
    /* Kein padding-right mehr - wird jetzt per JS berechnet */
}

.timeline-item {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item:last-child {
    margin-right: 0; /* Letztes Item ohne extra Margin */
}

.timeline-date {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
    min-height: 24px;
    font-weight: 500;
}

.timeline-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.timeline-connector {
    position: absolute;
    top: 50%;
    left: 50%; /* Zentrum des Icons */
    width: 340px; /* Volle Distanz zum nächsten Icon (Item 300px + Gap 40px) */
    height: 2px;
    background: #e0e0e0;
    transform: translate(0, -50%); /* Nur vertikal zentrieren, horizontal bei Icon-Mitte starten */
    z-index: 0;
}

.timeline-item:last-child .timeline-connector {
    display: none;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #6eb92f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-icon svg {
    width: 24px;
    height: 24px;
}

.timeline-content {
    width: 100%;
}

.timeline-box {
	display: flex;
    min-height: 135px;
    background: #6eb92f;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
	    align-content: center;
    align-items: center;
    justify-content: center;
}

.timeline-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.timeline-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

.timeline-description p {
    margin: 0 0 10px 0;
}

.timeline-description p:last-child {
    margin-bottom: 0;
}

/* Navigation Buttons */
.timeline-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    outline: none;
}

.timeline-nav svg {
    width: 20px;
    height: 20px;
    display: block;
}

.timeline-nav svg path {
    stroke: #666;
    transition: stroke 0.2s ease;
}

.timeline-nav:hover {
    background: #6eb92f;
    border-color: #6eb92f;
    transform: translateY(-50%) scale(1.1);
}

.timeline-nav:hover svg path {
    stroke: #ffffff;
}

.timeline-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.timeline-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background: #f5f5f5;
}

.timeline-nav:disabled:hover {
    transform: translateY(-50%);
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.timeline-nav-prev {
    left: 0;
}

.timeline-nav-next {
    right: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-manager-wrapper {
        padding: 0 50px;
    }
    
    .timeline-item {
        flex: 0 0 250px;
    }
    
    .timeline-nav {
        width: 40px;
        height: 40px;
    }
    
    .timeline-nav svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .timeline-manager-wrapper {
        padding: 0 45px;
    }
    
    .timeline-item {
        flex: 0 0 220px;
    }
    
    .timeline-date {
        font-size: 14px;
    }
    
    .timeline-title {
        font-size: 16px;
    }
    
    .timeline-description {
        font-size: 13px;
    }
    
    .timeline-nav {
        width: 36px;
        height: 36px;
    }
    
    .timeline-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Custom Colors Support */
.timeline-manager-wrapper[data-bg-color] .timeline-icon,
.timeline-manager-wrapper[data-bg-color] .timeline-box {
    background: var(--timeline-bg-color, #6eb92f);
}

.timeline-manager-wrapper[data-text-color] .timeline-box {
    color: var(--timeline-text-color, #ffffff);
}
