/**
 * Route Card Component Styles
 * 메인 페이지 그리드 카드 컴포넌트
 */

/* ===================================
   Base Styles
   =================================== */

.route-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    padding: 12px;
    min-height: 70px;
}

.route-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.route-card.active {
    border: 1px solid #FF385C;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.2);
    outline: 1px solid #FF385C;
}

/* Schema.org meta spans - 레이아웃에서 제외 */
.route-card > meta,
.route-card > span[itemprop] {
    display: none;
}

/* Route Card Left (Title + Meta) */
.route-card-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.route-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Route Card Right (Buttons) */
.route-card-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.route-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    min-width: 64px;
}

.route-card-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.detail-btn:hover,
.review-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Route Card Meta */
.route-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.route-card-meta>* {
    white-space: nowrap;
}

/* Type Badge */
.route-type-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: #e3f2fd;
    color: #1976d2;
    flex-shrink: 0;
    text-transform: uppercase;
}

.route-type-badge.road {
    background: #e3f2fd;
    color: #1976d2;
}

.route-type-badge.trail {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Divider */
.route-divider {
    color: #ddd;
    font-weight: 300;
    flex-shrink: 0;
}

/* Download Stat */
.route-download-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* Course Badges */
.route-courses {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.course-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.course-badge.short {
    background: #c8e6c9;
    color: #1b5e20;
}

.course-badge.medium {
    background: #ffe0b2;
    color: #bf360c;
}

.course-badge.long {
    background: #f8bbd0;
    color: #880e4f;
}

.course-badge.ultra {
    background: #d1c4e9;
    color: #4527a0;
}

.course-badge.custom {
    background: #e0e0e0;
    color: #424242;
}

/* Year Label */
.route-card-year {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    flex-shrink: 0;
}

/* ===================================
   Mobile Styles
   =================================== */

@media (max-width: 768px) {
    .route-card {
        padding: 10px 12px;
    }

    /* On mobile, allow cards to size based on content */
    .routes-grid .route-card {
        height: auto;
        max-height: none;
        min-height: 60px;
    }

    .route-card-title {
        font-size: 14px;
    }

    .route-card-btn {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 52px;
    }

    /* Mobile: All info in one line */
    .route-card-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        margin-bottom: 0;
    }

    .route-type-badge {
        flex-shrink: 0;
        font-size: 10px;
        padding: 2px 8px;
    }

    .route-divider {
        flex-shrink: 0;
    }

    .route-courses {
        gap: 3px;
    }

    .course-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .route-card-year {
        flex-shrink: 0;
    }
}

/* ===================================
   Dark Mode Styles
   =================================== */

[data-theme="dark"] .route-card {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .route-card:hover {
    box-shadow: 0 4px 12px var(--shadow-md);
}

[data-theme="dark"] .route-card-title {
    color: var(--text-primary);
}

[data-theme="dark"] .route-card-year {
    color: var(--text-secondary);
}

[data-theme="dark"] .route-divider {
    color: var(--border-primary);
}

/* Dark mode: Course badges */
[data-theme="dark"] .course-badge.short {
    background: #2e7d32;
    color: #c8e6c9;
}

[data-theme="dark"] .course-badge.medium {
    background: #e65100;
    color: #ffe0b2;
}

[data-theme="dark"] .course-badge.long {
    background: #ad1457;
    color: #f8bbd0;
}

[data-theme="dark"] .course-badge.ultra {
    background: #5e35b1;
    color: #d1c4e9;
}

[data-theme="dark"] .course-badge.custom {
    background: #616161;
    color: #e0e0e0;
}
