/* ===== RESOURCE TRACKING HUD ===== */
/* Styled to match the gold glassy mission tracker theme */

.resource-tracking-hud {
    position: fixed;
    /* top position handled by JavaScript in ResourceTrackingHUD.js */
    right: 20px;
    width: 280px;
    max-height: 400px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 140, 0, 0.95));
    border: 2px solid #FFD700;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'Orbitron', 'Courier New', monospace;
    color: #000;
    z-index: 5400;
    transition: all 0.3s ease;
}

.resource-tracking-hud.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
}

/* Header */
.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3) 0%, rgba(184, 134, 11, 0.2) 100%);
    border-bottom: 1px solid rgba(139, 69, 19, 0.4);
    border-radius: 6px 6px 0 0;
}

.tracking-title {
    color: #8B4513;
    font-size: calc(11px * var(--global-font-scale));
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tracking-close-btn {
    background: none;
    border: 1px solid #ff4444;
    color: #ff4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: calc(14px * var(--global-font-scale));
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.tracking-close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(1.1);
}

/* Content */
.tracking-content {
    padding: 10px;
    overflow-y: auto;
    max-height: 350px;
}

/* Navigation Status */
.navigation-status {
    background: rgba(139, 69, 19, 0.15);
    border: 1px solid rgba(139, 69, 19, 0.4);
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 8px;
}

.nav-target {
    color: #8B4513;
    font-size: calc(10px * var(--global-font-scale));
    font-weight: bold;
    margin-bottom: 2px;
}

.nav-distance {
    color: rgba(0, 0, 0, 0.6);
    font-size: calc(9px * var(--global-font-scale));
}

/* Tracking List */
.tracking-list {
    margin-bottom: 8px;
}

.no-tracking {
    color: rgba(0, 0, 0, 0.5);
    font-size: calc(9px * var(--global-font-scale));
    text-align: center;
    padding: 12px;
    font-style: italic;
}

.tracking-item {
    background: rgba(139, 69, 19, 0.15);
    border: 1px solid rgba(139, 69, 19, 0.3);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 6px;
    transition: all 0.3s;
}

.tracking-item:hover {
    border-color: rgba(139, 69, 19, 0.5);
    background: rgba(139, 69, 19, 0.25);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.tracking-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.item-name {
    color: #8B4513;
    font-size: calc(10px * var(--global-font-scale));
    font-weight: bold;
    text-transform: uppercase;
    flex: 1;
}

.tracking-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-quantity {
    color: rgba(0, 0, 0, 0.4);
    font-size: calc(9px * var(--global-font-scale));
    font-weight: normal;
}

.remove-tracking-btn {
    background: none;
    border: 1px solid #ff4444;
    color: #ff4444;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: calc(11px * var(--global-font-scale));
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    line-height: 1;
}

.remove-tracking-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(1.1);
}

/* Resource Requirements */
.resource-requirements {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resource-req {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: calc(9px * var(--global-font-scale));
}

.clickable-resource {
    cursor: pointer;
    transition: all 0.2s;
    padding: 3px;
    margin: -3px;
    border-radius: 3px;
}

.clickable-resource:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateX(2px);
}

/* Navigating state - resource is current autopilot target */
.clickable-resource.navigating {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.08) 0%, rgba(0, 255, 136, 0.03) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow:
        inset 0 0 8px rgba(0, 255, 136, 0.1),
        0 0 8px rgba(0, 255, 136, 0.2);
    animation: navigation-pulse 2.5s ease-in-out infinite;
}

.clickable-resource.navigating:hover {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.12) 0%, rgba(0, 255, 136, 0.05) 100%);
    border-color: rgba(0, 255, 136, 0.4);
}

.clickable-resource.navigating .resource-name {
    /* Keep original color, just add subtle glow */
    text-shadow: 0 0 4px rgba(0, 255, 136, 0.3);
}

@keyframes navigation-pulse {
    0%, 100% {
        box-shadow:
            inset 0 0 8px rgba(0, 255, 136, 0.1),
            0 0 8px rgba(0, 255, 136, 0.2);
        border-color: rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow:
            inset 0 0 12px rgba(0, 255, 136, 0.15),
            0 0 12px rgba(0, 255, 136, 0.4);
        border-color: rgba(0, 255, 136, 0.5);
    }
}

.resource-name {
    color: rgba(0, 0, 0, 0.8);
    min-width: 60px;
    text-transform: capitalize;
    font-weight: 500;
}

.resource-amount {
    color: #4a2511;
    min-width: 40px;
    font-weight: bold;
    font-size: calc(8px * var(--global-font-scale));
}

.resource-progress {
    flex: 1;
    height: 3px;
    background: rgba(139, 69, 19, 0.2);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(139, 69, 19, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #D2691E 0%, #DAA520 50%, #FFD700 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

/* Actions */
.tracking-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tracking-btn {
    flex: 1;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.6) 0%, rgba(101, 67, 33, 0.6) 100%);
    border: 1px solid rgba(139, 69, 19, 0.8);
    color: #000;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: calc(10px * var(--global-font-scale));
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.tracking-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.8) 0%, rgba(101, 67, 33, 0.8) 100%);
}

.tracking-btn.secondary {
    background: linear-gradient(135deg, rgba(80, 80, 80, 0.6) 0%, rgba(50, 50, 50, 0.6) 100%);
    border-color: rgba(80, 80, 80, 0.8);
}

.tracking-btn.secondary:hover {
    box-shadow: 0 4px 8px rgba(136, 136, 136, 0.3);
}

/* Animations */
@keyframes tracking-pulse {
    0%, 100% { 
        border-color: rgba(0, 255, 136, 0.3);
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }
    50% { 
        border-color: rgba(0, 255, 136, 0.6);
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    }
}

.tracking-item.active {
    animation: tracking-pulse 2s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .resource-tracking-hud {
        width: 300px;
        right: 10px;
        top: 10px;
    }
    
    .tracking-content {
        padding: 15px;
    }
}

/* Scrollbar styling */
.tracking-content::-webkit-scrollbar {
    width: 6px;
}

.tracking-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.tracking-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.5);
    border-radius: 3px;
}

.tracking-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.7);
}

/* Completion Notification */
.tracking-completion-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.95) 0%, rgba(0, 200, 100, 0.95) 70%);
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: completion-appear 0.5s ease-out;
    z-index: 10000;
}

@keyframes completion-appear {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
}

.completion-message {
    color: #fff;
    font-size: calc(14px * var(--global-font-scale));
    font-weight: bold;
    margin-bottom: 15px;
}

.return-to-station-btn {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.9) 0%, rgba(0, 136, 204, 0.9) 100%);
    border: 2px solid #00d4ff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: calc(12px * var(--global-font-scale));
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.return-to-station-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.9) 0%, rgba(0, 150, 220, 0.9) 100%);
}
