/* ============ PROGRESSION MAP ============ */

.progression-map {
    position: relative;
    padding: 20px 0;
}

/* Connecting line */
.progression-map::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-color);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Node container */
.map-node {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    z-index: 1;
}

/* Alternate left/right */
.map-node:nth-child(odd) {
    justify-content: flex-start;
    padding-right: 55%;
}
.map-node:nth-child(even) {
    justify-content: flex-end;
    padding-left: 55%;
}

/* Center dot on the line */
.map-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border-color);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 2px var(--border-color);
    z-index: 2;
}

/* Node states */
.map-node.available .map-dot {
    background: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}
.map-node.star-1 .map-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #f59e0b;
}
.map-node.star-2 .map-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}
.map-node.star-3 .map-dot {
    background: #22c55e;
    box-shadow: 0 0 0 2px #22c55e;
}

/* Fill the line up to the current progress */
.map-node.available .map-dot::before,
.map-node.star-1 .map-dot::before,
.map-node.star-2 .map-dot::before,
.map-node.star-3 .map-dot::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 4px;
    height: 24px;
    transform: translateX(-50%);
}

/* Card */
.map-card {
    display: block;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    width: 100%;
    box-shadow: var(--shadow);
}

.map-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.map-node.locked .map-card {
    opacity: 0.5;
    pointer-events: none;
    background: #f8fafc;
}
.map-node.locked .map-card:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--border-color);
}

/* Card content */
.map-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.map-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    flex: 1;
    margin-right: 8px;
}

.map-card-stars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.map-card-stars .star-filled {
    color: #fbbf24;
}
.map-card-stars .star-empty {
    color: #d1d5db;
}

.map-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.map-card-score {
    font-weight: 600;
}
.map-card-score.excellent { color: #22c55e; }
.map-card-score.good { color: #3b82f6; }
.map-card-score.needs-work { color: #f59e0b; }

/* Locked indicator */
.map-card-locked {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 4px 0;
}

/* Topic tags in map */
.map-card-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.map-card-topics .topic-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    /* Single column on mobile */
    .progression-map::before {
        left: 20px;
    }

    .map-node:nth-child(odd),
    .map-node:nth-child(even) {
        justify-content: flex-start;
        padding-left: 48px;
        padding-right: 0;
    }

    .map-dot {
        left: 20px;
    }

    .map-card-title {
        font-size: 0.85rem;
    }
}
