/**
 * FlowView Styles - Unified home timeline for PawLog
 * Clean, clickable design
 */

/* === FlowView Container === */
#flow-view-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
    padding-bottom: calc(80px + var(--safe-area-bottom));
}

/* === Flow Timeline === */
.flow-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* === Flow Empty State === */
.flow-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.flow-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.flow-empty h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.flow-empty p {
    font-size: 0.875rem;
}

/* === Past Indicator === */
.flow-past-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

.flow-past-indicator svg {
    width: 14px;
    height: 14px;
}

/* === Flow Day === */
.flow-day {
    background: var(--color-surface);
    border-radius: var(--card-radius);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* === Day Header === */
.flow-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
}

.flow-day-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.flow-day-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-border);
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
}

/* Today styling */
.flow-day-today .flow-day-header {
    background: var(--color-primary);
}

.flow-day-today .flow-day-label {
    color: white;
}

.flow-day-today .flow-day-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Future styling */
.flow-day-future {
    border-style: dashed;
    border-color: var(--color-primary);
    opacity: 0.9;
}

.flow-day-future .flow-day-header {
    background: rgba(0, 122, 255, 0.05);
}

.flow-day-future .flow-day-label {
    color: var(--color-primary);
}

/* === Day Events List === */
.flow-day-events {
    display: flex;
    flex-direction: column;
}

/* === Flow Event - Compact */
.flow-event {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--color-border);
}

.flow-event:last-child {
    border-bottom: none;
}

.flow-event:hover {
    background: var(--color-background);
}

.flow-event:active {
    background: var(--color-border);
}

/* === Event Icon - Compact */
.flow-event-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    flex-shrink: 0;
}

.flow-event-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

/* Event kind colors */
.flow-event-icon.kind-walk {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

.flow-event-icon.kind-meal {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

.flow-event-icon.kind-vet {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

.flow-event-icon.kind-play {
    background: rgba(255, 45, 85, 0.12);
    color: #FF2D55;
}

.flow-event-icon.kind-medicine {
    background: rgba(175, 82, 222, 0.12);
    color: #AF52DE;
}

.flow-event-icon.kind-grooming {
    background: rgba(90, 200, 250, 0.12);
    color: #5AC8FA;
}

.flow-event-icon.kind-training {
    background: rgba(255, 204, 0, 0.12);
    color: #FFCC00;
}

/* === Event Info - Compact */
.flow-event-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.flow-event-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flow-event-time {
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
}

.flow-event-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
    margin-top: 0.125rem;
}

.flow-event-location svg {
    flex-shrink: 0;
}

/* === Trainer Badge === */
.flow-event-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flow-event-badge svg {
    width: 14px;
    height: 14px;
    color: var(--color-text-secondary);
    opacity: 0.6;
}

/* === Chevron === */
.flow-event-chevron {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.3;
}

.flow-event-chevron svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
}

/* === Desktop Adjustments === */
@media (min-width: 768px) {
    #flow-view-container {
        padding: 0.5rem 1rem 2rem;
    }

    .flow-timeline {
        gap: 1rem;
    }

    .flow-day-header {
        padding: 0.625rem 1rem;
    }

    .flow-day-label {
        font-size: 0.875rem;
    }

    .flow-event {
        padding: 0.625rem 1rem;
    }

    .flow-event-icon {
        width: 32px;
        height: 32px;
    }

    .flow-event-icon svg {
        width: 17px;
        height: 17px;
    }

    .flow-event-title {
        font-size: 0.875rem;
    }
}

/* === Dark Mode Adjustments === */
@media (prefers-color-scheme: dark) {
    .flow-day {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .flow-day-future .flow-day-header {
        background: rgba(0, 122, 255, 0.1);
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .flow-event {
        transition: none;
    }
}