/* Partial: _journey.css.j2 — Journey cards, search, grouping, compact variants */

/* Journey Cards */
.journey-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.journey-search {
    flex: 1;
    max-width: 400px;
}

.journey-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
}

.journey-search input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.journey-count {
    font-size: 0.875rem;
    color: #6c757d;
}

.journey-list {
    display: grid;
    gap: 16px;
    padding: 16px 0;
}

.journey-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.journey-card:hover {
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.journey-card.hidden {
    display: none;
}

.journey-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.journey-card .journey-id {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.75rem;
    color: white;
    background: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.journey-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.4;
}

.journey-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.journey-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.journey-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.journey-meta-value {
    font-size: 0.875rem;
    color: #212529;
}

.journey-card .journey-description {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.6;
    white-space: pre-wrap;
}

.journey-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.journey-refs-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 600;
    margin-right: 2px;
    align-self: center;
}

.journey-ref-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #0d6efd;
    background: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.journey-ref-badge:hover {
    background: #0d6efd;
    color: #fff;
}

.no-journeys {
    text-align: center;
    padding: 48px;
    color: #6c757d;
}

/* Journey Grouping */
.journey-group-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journey-group-controls label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.journey-group-controls select {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
}

.journey-group-controls select:focus {
    outline: none;
    border-color: #4299e1;
}

.journey-group {
    margin-bottom: 24px;
}

.journey-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(to right, #e9ecef, #f8f9fa);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.journey-group-header:hover {
    background: linear-gradient(to right, #dee2e6, #e9ecef);
}

.journey-group-header .expand-icon {
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.2s;
    width: 16px;
}

.journey-group.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.journey-group-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    flex: 1;
}

.journey-group-count {
    font-size: 0.75rem;
    color: #6c757d;
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.journey-group-cards {
    display: grid;
    gap: 12px;
    padding-left: 0;
}

.journey-group.collapsed .journey-group-cards {
    display: none;
}

/* Compact card variant for grouped view */
.journey-card.compact {
    padding: 14px 16px;
}

.journey-card.compact .journey-card-header {
    margin-bottom: 8px;
}

.journey-card.compact h3 {
    font-size: 1rem;
}

.journey-card.compact .journey-description {
    font-size: 0.8rem;
    max-height: 80px;
    overflow: hidden;
    position: relative;
}

.journey-card.compact .journey-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, white);
}

.journey-card.compact.expanded .journey-description {
    max-height: none;
}

.journey-card.compact.expanded .journey-description::after {
    display: none;
}
