/* Milestone Timeline Widget CSS */

.tae-milestone-timeline-widget {
    position: relative;
    font-family: 'IBM Plex Sans Thai', sans-serif;
}

/* Timeline Navigation Area */
.tae-milestone-nav-area {
    position: relative;
    margin-bottom: 3rem;
    padding: 2rem 0;
    display: flex;
    align-items: flex-end; /* Align to the bottom where dots are */
}

/* Center exactly behind the dots */
.tae-milestone-track-line {
    position: absolute;
    bottom: 36px; /* 32px padding + 5px dot center - 1px border */
    left: 45px;
    right: 45px;
    height: 0;
    border-top: 2px dashed #e2e8f0; /* slighly softer line */
    z-index: 0;
}

/* Nav Arrows */
.tae-milestone-arrow {
    position: absolute;
    bottom: 21px; /* perfectly align to dot center (36px from bottom minus half arrow height 15px) */
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9; /* default light gray */
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.tae-milestone-arrow:hover:not(.swiper-button-disabled) {
    background-color: var(--color-primary); /* primary */
    color: white;
}
.tae-milestone-arrow.swiper-button-disabled {
    opacity: 0; /* Fade out completely when disabled for cleaner look */
    pointer-events: none;
}

.tae-milestone-arrow-prev {
    left: 0;
}
.tae-milestone-arrow-next {
    right: 0;
}

/* Swiper Container */
.tae-milestone-swiper {
    position: relative;
    z-index: 1;
    margin: 0 40px; /* space for arrows */
}

/* Timeline Nav Item (Year) */
.tae-milestone-nav-item {
    text-align: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.tae-milestone-nav-year {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #4b5563; /* gray-600 */
    transition: all 0.3s ease;
}

.tae-milestone-nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #9ca3af; /* gray-400 */
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 5px #ffffff;
    position: relative;
    z-index: 2;
}

/* Active State for Nav Item */
.tae-milestone-nav-item.is-active .tae-milestone-nav-year {
    color: #000000;
    font-weight: 600;
}

.tae-milestone-nav-item.is-active .tae-milestone-nav-dot {
    background-color: #3fb14e; /* primary */
    transform: scale(1.3);
}

/* Bottom Content Area */
.tae-milestone-content-area {
    position: relative;
}

.tae-milestone-pane {
    animation: fadeIn 0.4s ease forwards;
}

.tae-milestone-wysiwyg h3, .tae-milestone-wysiwyg h4 {
    color: #374151; /* gray-700 */
    font-size: 16px;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.tae-milestone-wysiwyg ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.tae-milestone-wysiwyg ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    color: #4b5563; /* gray-600 */
    font-size: 14px;
    line-height: 1.6;
}

.tae-milestone-wysiwyg ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #9ca3af; /* gray-400 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
