/* Timeline Navigator Styles */

.timeline-navigator {
    position: fixed;
    top: 80px;
    left: 280px;
    right: 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #0066cc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 16px 24px;
    transition: all 0.3s ease;
}

/* Timeline Header */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.timeline-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #0066cc;
}

.timeline-title i {
    font-size: 18px;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #666;
}

.total-days {
    background: #e3f2fd;
    color: #0066cc;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.admission-date {
    color: #666;
}

/* Timeline Track */
.timeline-track {
    position: relative;
    padding: 20px 0;
}

.timeline-progress-bar {
    position: absolute;
    top: 35px;
    left: 50px;
    right: 50px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-line {
    height: 100%;
    background: linear-gradient(to right, #0066cc 0%, #00a8e8 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 2px;
}

/* Timeline Days Container */
.timeline-days {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    gap: 8px;
}

/* Individual Timeline Day */
.timeline-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-day:hover {
    transform: translateY(-4px);
}

.timeline-day:hover .day-content {
    background: #f0f7ff;
    box-shadow: 0 6px 16px rgba(0,102,204,0.2);
}

/* Day Marker (Dot) */
.day-marker {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    z-index: 2;
}

.day-dot {
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid #ccc;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-day:hover .day-dot {
    border-color: #0066cc;
    transform: scale(1.3);
}

.timeline-day.active .day-dot {
    width: 20px;
    height: 20px;
    border-color: #0066cc;
    background: #0066cc;
    box-shadow: 0 0 0 4px rgba(0,102,204,0.2);
}

/* Day Content Card */
.day-content {
    background: white;
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
    min-width: 90px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.timeline-day.active .day-content {
    background: linear-gradient(135deg, #0066cc 0%, #00a8e8 100%);
    color: white;
    border-color: #0066cc;
    box-shadow: 0 8px 16px rgba(0,102,204,0.3);
    transform: scale(1.05);
}

.day-number {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.8;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.timeline-day.active .day-number {
    opacity: 1;
}

.day-date {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.day-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    opacity: 0.9;
}

.timeline-day.active .day-label {
    opacity: 1;
}

.day-icon {
    font-size: 22px;
    margin-top: 4px;
}

/* Timeline Info */
.timeline-info {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.current-day-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #0066cc;
    font-weight: 500;
}

.current-day-text i {
    font-size: 14px;
}

/* Tooltip */
.timeline-tooltip {
    position: absolute;
    background: #2d3748;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.timeline-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #2d3748;
}

.timeline-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-content {
    white-space: pre-line;
}

.tooltip-content strong {
    display: block;
    margin-bottom: 6px;
    color: #90cdf4;
    font-size: 14px;
}

.tooltip-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tooltip-content li {
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.tooltip-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #90cdf4;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .timeline-navigator {
        left: 260px;
    }
    
    .day-content {
        min-width: 75px;
        padding: 10px 6px;
    }
    
    .day-date {
        font-size: 13px;
    }
    
    .day-label {
        font-size: 11px;
    }
    
    .day-icon {
        font-size: 18px;
    }
}

@media (max-width: 1200px) {
    .timeline-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    
    .admission-date {
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .timeline-navigator {
        left: 0;
        top: 70px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .timeline-meta {
        align-items: flex-start;
    }
    
    .timeline-days {
        gap: 4px;
    }
    
    .day-content {
        min-width: 60px;
        padding: 8px 4px;
    }
    
    .day-number {
        font-size: 10px;
    }
    
    .day-date {
        font-size: 12px;
    }
    
    .day-label {
        font-size: 10px;
    }
    
    .day-icon {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .timeline-navigator {
        padding: 12px 16px;
    }
    
    .timeline-progress-bar {
        left: 30px;
        right: 30px;
    }
    
    .day-marker {
        width: 30px;
        height: 30px;
    }
    
    .day-dot {
        width: 12px;
        height: 12px;
        border-width: 3px;
    }
    
    .timeline-day.active .day-dot {
        width: 16px;
        height: 16px;
    }
    
    .day-content {
        min-width: 50px;
        padding: 6px 3px;
    }
    
    .day-number {
        font-size: 9px;
    }
    
    .day-date {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .day-label {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .day-icon {
        font-size: 14px;
    }
    
    .timeline-info {
        margin-top: 12px;
        padding-top: 10px;
    }
    
    .current-day-text {
        font-size: 11px;
    }
}

/* Animation for progress line */
@keyframes progressAnimation {
    from {
        width: 0%;
    }
}

.progress-line {
    animation: progressAnimation 1s ease-out;
}

/* Pulse animation for active day */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0,102,204,0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0,102,204,0);
    }
}

.timeline-day.active .day-dot {
    animation: pulse 2s infinite;
}

/* Hover effects for better UX */
.timeline-day:not(.active):hover .day-content {
    border-color: #0066cc;
}

.timeline-day:not(.active):hover .day-number,
.timeline-day:not(.active):hover .day-label {
    color: #0066cc;
}

/* Accessibility improvements */
.timeline-day:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 8px;
}

.timeline-day:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Loading state */
.timeline-navigator.loading {
    opacity: 0.6;
    pointer-events: none;
}

.timeline-navigator.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Print styles */
@media print {
    .timeline-navigator {
        display: none;
    }
}
