/* Mode map overlay — learning pathway selection */
.mode-map-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.mode-map-overlay.open {
    display: flex;
    opacity: 1;
}

.mode-map-modal {
    background: #fff;
    border-radius: 12px;
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.15);
    transform: translateY(12px);
    transition: transform 0.2s;
}

.mode-map-overlay.open .mode-map-modal {
    transform: translateY(0);
}

.mode-map-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 2rem 0.5rem;
    gap: 1rem;
}

.mode-map-header-text h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.mode-map-header-text p {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

.mode-map-close-btn {
    background: none;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    padding: 0.35rem;
    flex-shrink: 0;
}

.mode-map-close-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.mode-map-body {
    padding: 0.5rem 2rem 2rem;
}

.mode-map-ground {
    background:
        radial-gradient(ellipse 120px 80px at 15% 25%, rgba(187, 204, 170, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 100px 60px at 85% 75%, rgba(187, 204, 170, 0.12) 0%, transparent 60%),
        linear-gradient(160deg, #f8fafc 0%, #f1f5f9 40%, #e8eef3 100%);
    border-radius: 10px;
    padding: 1.5rem;
}

.mode-map-rows {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mode-map-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-start;
}

.map-station {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 10px;
    text-align: left;
    font-family: inherit;
}

.map-station:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.5);
}

.map-station:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.map-station .building-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    flex-shrink: 0;
}

.map-station .building-icon {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.08));
}

.map-station .short-label {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #475569;
    text-align: center;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.map-station .hover-card {
    position: relative;
    width: 220px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    padding: 10px 12px;
    flex-shrink: 0;
}

.map-station .mode-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
    line-height: 1.3;
    color: #475569;
}

.map-station .mode-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
    margin-bottom: 6px;
}

.map-station .case-pill {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-block;
    font-weight: 500;
}

@media (max-width: 640px) {
    .map-station {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .map-station .hover-card {
        width: 100%;
    }
}

/* Case type selection modal — reuses mode map icons and labels */
.case-type-selection-desc {
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.case-type-selection-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.case-type-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    font-family: inherit;
}

.case-type-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.case-type-option .building-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 56px;
    flex-shrink: 0;
}

.case-type-option .building-icon {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.case-type-option .option-text {
    flex: 1;
    min-width: 0;
}

.case-type-option .mode-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.3;
}

.case-type-option .mode-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.3;
}
