/**
 * ╔═══════════════════════════════════════════════════════════════════════════╗
 * ║                    SciQuest — Paths Styles                                ║
 * ╠═══════════════════════════════════════════════════════════════════════════╣
 * ║  Stili za paths.html - učne poti s filtrom po predmetih                   ║
 * ║  - Filter gumbi na vrhu                                                   ║
 * ║  - Vertikalna pot z regijami in sobami                                    ║
 * ║  - Responsive za mobilne naprave                                          ║
 * ╚═══════════════════════════════════════════════════════════════════════════╝
 */


/* ═══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.paths-page {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.paths-filter-bar {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-family: 'Play', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    background: var(--bg-primary);
    border-color: var(--subject-color, var(--border));
    color: var(--text);
}

.filter-tab.active {
    background: var(--subject-color, var(--accent));
    border-color: var(--subject-color, var(--accent));
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--subject-color, var(--accent)) 40%, transparent);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-name {
    white-space: nowrap;
}

.filter-stats {
    display: flex;
    gap: 20px;
}

.filter-stats .stat {
    text-align: center;
}

.filter-stats .stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.filter-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════════════════
   PATH CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.path-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SUBJECT HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.subject-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.subject-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.subject-info {
    flex: 1;
}

.subject-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.subject-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   PATH CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.path-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.path-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.path-empty .empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   REGION
   ═══════════════════════════════════════════════════════════════════════════ */

.path-region {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.region-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.region-marker {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--region-color, var(--accent));
    border-radius: 50%;
    flex-shrink: 0;
}

.region-number {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.region-info {
    flex: 1;
}

.region-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.region-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.region-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
}

.region-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.region-progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ROOM CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.region-rooms {
    padding: 8px 0;
}

.room-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.room-card:hover {
    background: var(--bg-tertiary);
}

.room-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.room-card.locked:hover {
    background: transparent;
}

.room-card.completed .room-node {
    background: var(--room-color, var(--accent));
}

/* Connector line */
.room-connector {
    position: absolute;
    left: 39px;
    top: -8px;
    width: 2px;
    height: 20px;
    background: var(--border);
}

.room-connector.first {
    display: none;
}

/* Room node (circle) */
.room-node {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.room-card:hover .room-node {
    border-color: var(--room-color, var(--accent));
}

.room-card.completed .room-node {
    border-color: var(--room-color, var(--accent));
}

.room-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-check {
    font-size: 1.2rem;
    color: white;
}

.room-lock {
    font-size: 0.9rem;
}

.room-type-icon {
    font-size: 1rem;
}

/* Room content */
.room-content {
    flex: 1;
    min-width: 0;
}

.room-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
}

.room-xp {
    color: var(--accent);
}

.room-difficulty {
    letter-spacing: 1px;
}

/* Room arrow */
.room-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all var(--transition-fast);
}

.room-card:not(.locked):hover .room-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: var(--room-color, var(--accent));
}


/* ═══════════════════════════════════════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════════════════════════════════════ */

.room-tooltip {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-width: 220px;
    max-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-5px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

.room-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.tooltip-type {
    color: var(--text-muted);
}

.tooltip-difficulty {
    font-weight: 600;
}

.tooltip-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.tooltip-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.tooltip-xp {
    color: var(--accent);
    font-weight: 600;
}

.tooltip-status {
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Tablet
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .paths-filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .filter-stats {
        width: 100%;
        justify-content: center;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Mobile
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .paths-page {
        padding-top: 60px;
    }
    
    .paths-filter-bar {
        position: sticky;
        top: 60px;
        padding: 10px 12px;
    }
    
    .filter-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .tab-name {
        display: none;
    }
    
    .tab-icon {
        font-size: 1.4rem;
    }
    
    .path-container {
        padding: 16px 12px;
    }
    
    .subject-header {
        padding: 16px;
        gap: 12px;
    }
    
    .subject-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .subject-name {
        font-size: 1.2rem;
    }
    
    .subject-desc {
        font-size: 0.8rem;
    }
    
    .region-header {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .region-marker {
        width: 32px;
        height: 32px;
    }
    
    .region-number {
        font-size: 0.9rem;
    }
    
    .region-name {
        font-size: 1rem;
    }
    
    .room-card {
        padding: 10px 16px;
        gap: 10px;
    }
    
    .room-connector {
        left: 35px;
    }
    
    .room-node {
        width: 36px;
        height: 36px;
    }
    
    .room-title {
        font-size: 0.9rem;
    }
    
    .room-meta {
        font-size: 0.75rem;
        gap: 8px;
    }
    
    .room-arrow {
        display: none;
    }
    
    /* Tooltip na mobilnih napravah */
    .room-tooltip {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Small Mobile
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 400px) {
    .filter-tab {
        padding: 8px 10px;
    }
    
    .filter-stats .stat-value {
        font-size: 1rem;
    }
    
    .filter-stats .stat-label {
        font-size: 0.7rem;
    }
    
    .subject-header {
        flex-direction: column;
        text-align: center;
    }
    
    .region-progress-bar {
        max-width: 120px;
    }
}
