/* ===== AGENDA TIMELINE CSS - ORGANIZED VERSION ===== */
/* 
 * TIMELINE SCALING:
 * - Desktop: 80px per hour (1280px total for 16 hours)
 * - Mobile: 60px per hour (960px total for 16 hours)
 * - This provides 60% more space compared to original 50px/37.5px
 * - Improved readability for short-duration tasks (1-2 hours)
 */

/* ===== VARIABLES ===== */
:root {
    --timeline-bg: rgba(255, 255, 255, 0.8);
    --timeline-border: rgba(217, 168, 38, 1);
    --timeline-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --time-bg: rgba(247, 247, 247, 0.9);
    --current-time-color: #ff4444;
    --task-spacing: 1%;
    --task-available-width: 96%;
    --task-margin: 2%;
    
    /* Timeline scaling variables */
    --time-slot-height: 80px;
    --time-slot-height-mobile: 60px;
    --timeline-min-height: 1280px;
    --timeline-min-height-mobile: 960px;
}

/* ===== TIMELINE LAYOUT ===== */
.timeline-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.timeline-wrapper .agenda-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.simple-timeline {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0;
    flex: 1;
    height: 100%;
    max-height: calc(100vh - 150px);
    background: var(--timeline-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--timeline-shadow);
}

/* ===== SCROLLING ===== */
.time-markers, .tasks-grid {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 168, 38, 0.7) rgba(247, 247, 247, 0.3);
}

.time-markers::-webkit-scrollbar, .tasks-grid::-webkit-scrollbar {
    width: 8px;
}

.time-markers::-webkit-scrollbar-track, .tasks-grid::-webkit-scrollbar-track {
    background: rgba(247, 247, 247, 0.3);
    border-radius: 4px;
}

.time-markers::-webkit-scrollbar-thumb, .tasks-grid::-webkit-scrollbar-thumb {
    background: rgba(217, 168, 38, 0.7);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-markers::-webkit-scrollbar-thumb:hover, .tasks-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 168, 38, 0.9);
}

/* ===== SCROLL INDICATORS ===== */
.tasks-grid::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
    z-index: 1;
}

.time-markers::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(247, 247, 247, 0.9), transparent);
    pointer-events: none;
    z-index: 1;
}

/* ===== TIME COLUMN (LEFT) ===== */
.time-column {
    background: var(--time-bg);
    border-right: 2px solid var(--timeline-border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.time-header {
    height: 75px;
    padding: 20px 16px;
    background: var(--timeline-border);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-markers {
    position: relative;
    height: calc(100% - 75px);
    min-height: var(--timeline-min-height);
    max-height: calc(100vh - 225px);
    overflow-y: auto;
    overflow-x: hidden;
}

.time-slot {
    height: var(--time-slot-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    box-sizing: border-box;
}

.time-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #444;
}

/* ===== CURRENT TIME LINES ===== */
.current-time-line-left, .current-time-line-right {
    position: absolute;
    height: 3px;
    background: var(--current-time-color);
    z-index: 10;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
    transition: top 0.3s ease;
}

.current-time-line-left {
    left: 0;
    right: 0;
}

.current-time-line-left::before {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 6px solid var(--current-time-color);
    border-top: 4.5px solid transparent;
    border-bottom: 4.5px solid transparent;
}

.current-time-line-right {
    left: 0;
    right: 0;
    margin: 0 24px;
    z-index: 5;
}

/* ===== TASKS COLUMN (RIGHT) ===== */
.tasks-column {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
}

.tasks-header {
    height: 75px;
    padding: 20px 24px;
    background: rgba(217, 168, 38, 0.1);
    border-bottom: 1px solid rgba(217, 168, 38, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.tasks-header h3 {
    margin: 0;
    color: var(--h2-text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.task-count {
    background: var(--timeline-border);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tasks-grid {
    position: relative;
    height: calc(100% - 75px);
    min-height: var(--timeline-min-height);
    max-height: calc(100vh - 225px);
    padding: 0 24px;
    overflow-y: auto;
    overflow-x: hidden;
}

.time-grid-row {
    height: var(--time-slot-height);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* ===== TASK CARDS ===== */
.task-card {
    position: absolute;
    background: rgba(217, 168, 38, 0.95);
    border-radius: 8px;
    padding: 12px;
    margin: 2px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 64px;
    border-left: 4px solid var(--button-hover-color);
    box-sizing: border-box;
    z-index: 10;
}

.task-card:hover {
    background: rgba(217, 168, 38, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== IMPROVED SHORT TASK STYLING ===== */
.task-card[style*="height: 8%"], 
.task-card[style*="height: 9%"], 
.task-card[style*="height: 10%"],
.task-card[style*="height: 11%"],
.task-card[style*="height: 12%"] {
    padding: 8px 10px;
    min-height: 64px;
}

.task-card[style*="height: 8%"] .task-description,
.task-card[style*="height: 9%"] .task-description,
.task-card[style*="height: 10%"] .task-description {
    display: none;
}

/* ===== VISUAL ENHANCEMENT FOR READABILITY ===== */
.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    border-radius: 8px 8px 0 0;
}

/* ===== BETTER SPACING FOR CONTENT ===== */
.task-volunteer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.volunteer-stats {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volunteer-count {
    font-weight: 700;
    font-size: 0.8rem;
    color: #333;
}

.volunteer-label {
    font-size: 0.7rem;
    color: #555;
}

/* ===== TASK CARD BUTTON STYLING - COMPACT FOR AGENDA ===== */
.task-card .btn-volunteer-quick,
.task-card .btn-volunteer-login,
.task-card .btn-volunteer-registered {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    padding: 2px 6px !important;
    border-radius: 8px !important;
    font-size: 0.6rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    transition: all 0.2s ease !important;
    min-height: 18px !important;
    white-space: nowrap !important;
    min-width: auto !important;
    max-width: none !important;
    flex: none !important;
    justify-content: center !important;
}

.task-card .btn-volunteer-quick:hover,
.task-card .btn-volunteer-login:hover,
.task-card .btn-volunteer-registered:hover {
    background: white !important;
    transform: scale(1.02) !important;
    box-shadow: none !important;
}

.status-full {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    min-height: 18px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.status-message {
    background: rgba(100, 116, 139, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    min-height: 18px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.status-login-required {
    background: rgba(243, 244, 246, 0.9);
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    font-style: italic;
    border: 1px solid rgba(209, 213, 219, 0.8);
    min-height: 18px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* ===== TEXT VISIBILITY FOR OVERLAPPING TASKS ===== */
.task-card[data-total-columns="2"] .task-description,
.task-card[data-total-columns="3"] .task-description,
.task-card[data-total-columns="4"] .task-description,
.task-card[data-total-columns="5"] .task-description {
    display: none;
}

.task-card[data-total-columns="3"] .task-subtitle,
.task-card[data-total-columns="4"] .task-subtitle,
.task-card[data-total-columns="5"] .task-subtitle {
    font-size: 0.7rem;
}

.task-card[data-total-columns="4"] .task-title,
.task-card[data-total-columns="5"] .task-title {
    font-size: 0.8rem;
}

/* ===== OVERLAP INDICATORS ===== */
.task-card[data-total-columns="2"]::before,
.task-card[data-total-columns="3"]::before,
.task-card[data-total-columns="4"]::before,
.task-card[data-total-columns="5"]::before {
    /* content: "⚡"; */
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ===== NO TASKS STATE ===== */
.no-tasks {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -200%);
    text-align: center;
    color: #999;
}

.no-tasks-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.no-tasks p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

/* ===== TIMELINE NAVIGATION HINTS ===== */
.timeline-navigation-hint {
    display: none;
}

.timeline-navigation-hint:hover {
    opacity: 1;
}

.timeline-navigation-hint::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid rgba(0, 0, 0, 0.8);
}

/* ===== SCROLL POSITION INDICATOR ===== */
.scroll-position-indicator {
    position: absolute;
    top: 75px;
    right: 10px;
    width: 4px;
    height: calc(100% - 90px);
    background: rgba(217, 168, 38, 0.2);
    border-radius: 2px;
    z-index: 50;
}

.scroll-position-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(217, 168, 38, 0.8);
    border-radius: 2px;
    min-height: 20px;
    transition: background 0.2s ease;
}

.scroll-position-thumb:hover {
    background: rgba(217, 168, 38, 1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .simple-timeline {
        grid-template-columns: 100px 1fr;
    }
    
    .time-header, .tasks-header {
        padding: 16px;
    }
    
    .tasks-grid {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .agenda-content {
        height: calc(100vh - 100px);
    }
    
    .simple-timeline {
        grid-template-columns: 80px 1fr;
        max-height: calc(100vh - 150px);
    }
    
    .time-markers, .tasks-grid {
        min-height: var(--timeline-min-height-mobile);
    }
    
    .time-slot, .time-grid-row {
        height: var(--time-slot-height-mobile);
    }
    
    .time-label {
        font-size: 0.75rem;
    }
    
    .task-card {
        padding: 8px;
        min-height: 50px;
    }
    
    .task-title {
        font-size: 0.8rem;
    }
    
    .task-subtitle, .task-description {
        font-size: 0.7rem;
    }
    
    .tasks-header h3 {
        font-size: 1rem;
    }
    
    .time-header {
        font-size: 0.8rem;
        padding: 12px 8px;
    }
}

/* Mijn Taken Component Styles */
.task-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.task-status.past {
    background-color: #6c757d;
    color: white;
}

.task-status.upcoming {
    background-color: #28a745;
    color: white;
}

.task-status.soon {
    background-color: #fd7e14;
    color: white;
}

.mijntaak-card {
    background-color: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #28a745;
}

.mijntaak-card.past-task {
    border-left-color: #6c757d;
    opacity: 0.8;
}

/* Status message for task availability */
.status-message {
    display: block;
    font-size: 0.75rem;
    color: #dc3545;
    margin-top: 4px;
    padding: 0 10px;
}

/* Disabled button styles */
.btn-unregister.disabled {
    background-color: #6c757d;
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-unregister.disabled:hover {
    background-color: #6c757d;
}
