/* ========================================================
   Schedule column - day view time grid + event blocks
   ======================================================== */

/* --- Time grid container --- */
.schedule-grid {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- Hour rows --- */
.schedule-hour {
    display: flex;
    align-items: flex-start;
    height: var(--hour-height);
    border-bottom: 1px solid var(--border-light);
}

.schedule-hour-label {
    width: 56px;
    flex-shrink: 0;
    padding: 4px 8px 0 0;
    text-align: right;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    user-select: none;
}

.schedule-hour-slot {
    flex: 1;
    height: 100%;
    position: relative;
    cursor: pointer;
    transition: background 250ms ease;
}

.schedule-hour-slot:hover {
    background: var(--accent-soft);
}

/* --- Half-hour divider --- */
.schedule-hour-slot::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-bottom: 1px dashed var(--border-light);
}

/* --- Event blocks --- */
.schedule-event {
    position: absolute;
    left: 4px;
    right: 4px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--event-border);
    background: var(--event-bg);
    color: var(--event-text);
    cursor: pointer;
    overflow: hidden;
    z-index: 2;
    box-shadow:
        0 0 4px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 250ms ease, box-shadow 250ms ease, background 250ms ease, opacity 250ms ease;
}

.schedule-event:hover {
    box-shadow:
        0 0 6px rgba(0, 0, 0, 0.35),
        0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Past events — de-emphasised but still interactive */
.schedule-event--past {
    filter: brightness(0.5);
}

.schedule-event--past:hover {
    filter: brightness(0.75);
}

.schedule-event-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-event-time {
    font-size: var(--font-size-xs);
    opacity: 0.7;
    margin-top: 1px;
}

.schedule-event-warning {
    display: inline-block;
    font-size: var(--font-size-xs);
    color: var(--warning);
    margin-left: 4px;
}

/* --- Timed reminder blocks in schedule --- */
.schedule-event--reminder {
    border-left-color: var(--reminder-timed-border);
    background: var(--reminder-timed-bg);
    color: var(--reminder-timed-text);
}

/* --- Current time indicator (full-width, right-aligned, semi-transparent) --- */
.schedule-time-now {
    position: absolute;
    left: 8px;
    right: 0;
    height: 2px;
    background: none;
    z-index: 3;
    pointer-events: none;
    transition: opacity 250ms ease;
}

/* Full width line */
.schedule-time-now::before {
    content: '';
    position: absolute;
    right: 0px;
    top: 0px;
    width: 100%;
    height: 2px;
    background: var(--time-now);
    opacity: 1;
    transition: opacity 250ms ease;
}

/* Circle on the right edge */
.schedule-time-now::after {
    content: '';
    position: absolute;
    right: 0px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--time-now);
    opacity: 1;
}

/* Obscure time marker when hovering any event that covers "now" */
.schedule-grid:has(.schedule-event--now:hover) .schedule-time-now::before {
    opacity: 0.25;
}
.schedule-grid:has(.schedule-event--now:hover) .schedule-time-now::after {
    opacity: 0.25;
}
