/* Daily Log Specific Styles */
.daily-log-timeline {
    position: relative;
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.daily-log-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%; /* Center line for desktop */
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    transform: translateX(50%);
}

.log-day {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.log-day:nth-child(odd) {
    flex-direction: row-reverse;
}

.log-date-badge {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    z-index: 2;
    box-shadow: var(--shadow);
    border: 4px solid var(--white);
    white-space: nowrap;
}

.log-content {
    width: 45%; /* Half width minus spacing */
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
    margin-top: 2rem; /* Make space for the date badge */
}

.log-day:nth-child(odd) .log-content {
    margin-left: auto;
    margin-right: 0; /* Align right side of left column? No, flex-direction handles it */
}

.log-content::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--white);
    transform: rotate(45deg);
    z-index: 0;
}

/* Arrow positioning */
.log-day:nth-child(even) .log-content {
    margin-right: 55%; /* Push to left */
}
.log-day:nth-child(even) .log-content::before {
    right: -10px;
    border-right: 4px solid transparent; /* Fix later if needed */
}

.log-day:nth-child(odd) .log-content {
    margin-left: 55%; /* Push to right */
}
.log-day:nth-child(odd) .log-content::before {
    left: -10px;
}

/* Fix for RTL layout */
/* Since it's RTL:
   right: 50% is center.
   even child (first one usually): should be on Right side in RTL?
   Let's simplify. Standard vertical list on mobile, timeline on desktop.
*/

/* Resetting for a simpler, robust RTL timeline */
.timeline-container {
    position: relative;
    padding: 2rem 1rem;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 2rem;
    width: 3px;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-right: 4rem;
}

.timeline-marker {
    position: absolute;
    right: 1.1rem; /* On the line */
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid var(--white);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.timeline-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border-right: 4px solid var(--primary-color);
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    background: linear-gradient(to right, rgba(248, 249, 255, 0.5), transparent);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-date {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-day-name {
    background: var(--light-blue);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: grid;
    grid-template-columns: 60px 120px 1fr;
    gap: 1rem;
    align-items: flex-start;
    transition: background-color 0.2s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: var(--light-blue);
}

.activity-num {
    background: var(--gray-200);
    color: var(--gray-700);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.activity-time {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(118, 75, 162, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    width: fit-content;
}

.activity-desc {
    color: var(--gray-800);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .timeline-line {
        right: 1rem;
    }
    .timeline-item {
        padding-right: 2.5rem;
    }
    .timeline-marker {
        right: 0.1rem;
    }
    .activity-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .activity-num {
        display: inline-flex;
        margin-left: 0.5rem;
    }
    .activity-time {
        display: inline-flex;
    }
}
