/**
 * ResponsiveNavigationPanel Styles
 * Consolidates: BottomNav + BasesListScreen + HeroesListScreen + EntitiesSidebar
 */

/* ============================================
   Base Container
   ============================================ */

.responsive-nav-panel {
    /* Container for both mobile and desktop modes */
    position: relative;
    z-index: var(--z-sidebar);
}

/* ============================================
   Mobile Mode (< 1024px)
   ============================================ */

@media (max-width: 1023px) {

    /* Bottom Nav already styled in bottom-nav.css */

    /* Full-Screen List Screens */
    .screen {
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 64px;
        /* Above bottom nav */
        z-index: var(--z-sidebar);
        background: var(--bg-panel);
        display: none;
        /* Hidden by default, shown when tab active */
        flex-direction: column;
        overflow: hidden;
    }

    .screen-header {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        padding: var(--space-4);
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
    }

    .screen-title {
        font-size: var(--text-xl);
        font-weight: bold;
        color: #fff;
        margin: 0;
        flex: 1;
    }

    .screen-count {
        font-size: var(--text-sm);
        color: var(--ui-neutral);
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-sm);
        font-weight: 600;
    }

    .screen-action-btn {
        width: 40px;
        height: 40px;
        background: rgba(124, 92, 219, 0.2);
        border: 1px solid rgba(124, 92, 219, 0.4);
        border-radius: 8px;
        color: #7c5cdb;
        font-size: 20px;
        cursor: pointer;
        transition: all var(--duration-fast) ease;
    }

    .screen-action-btn:active {
        transform: scale(0.9);
    }

    /* Active state for Create Base button when in placement mode */
    .screen-action-btn.active {
        background: rgba(255, 215, 0, 0.3);
        border: 2px solid #FFD700;
        color: #FFD700;
        box-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
        animation: pulse-glow 1.5s ease-in-out infinite;
    }

    @keyframes pulse-glow {
        0%, 100% {
            box-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
        }
        50% {
            box-shadow: 0 0 24px rgba(255, 215, 0, 0.9);
        }
    }

    /* Screen List Container */
    .screen-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--space-2);
    }

    /* List Card (Base/Hero Item) */
    .list-card {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        padding: var(--space-3);
        margin-bottom: var(--space-2);
        background: var(--gradient-card);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        cursor: pointer;
        transition: all var(--duration-fast) ease;
        min-height: 72px;
    }

    .list-card:active {
        transform: scale(0.98);
        background: var(--bg-elevated);
    }

    .list-card-icon {
        font-size: 32px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .list-card-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .list-card-name-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
    }

    .list-card-name {
        font-size: var(--text-base);
        font-weight: 600;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .list-card-level {
        font-size: var(--text-sm);
        font-weight: 600;
        color: var(--ui-warning);
        flex-shrink: 0;
    }

    .list-card-stats {
        display: flex;
        align-items: center;
        gap: var(--space-3);
        font-size: var(--text-sm);
        color: var(--ui-neutral);
    }

    .list-card-stats span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* HP Bar */
    .list-card-hp-bar {
        height: 4px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
        overflow: hidden;
        margin-top: 2px;
    }

    .list-card-hp-fill {
        height: 100%;
        background: var(--ui-success);
        border-radius: 2px;
        transition: width var(--duration-normal) ease;
    }

    /* State Badge */
    .list-card-state {
        font-size: var(--text-xs);
    }

    .state-badge {
        padding: 2px 8px;
        border-radius: var(--radius-sm);
        font-weight: 600;
    }

    .state-idle {
        background: rgba(100, 200, 100, 0.2);
        color: #4ade80;
    }

    .state-moving {
        background: rgba(59, 130, 246, 0.2);
        color: #3b82f6;
    }

    .state-combat {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
    }

    .state-resting {
        background: rgba(168, 85, 247, 0.2);
        color: #a855f7;
    }

    .state-danger {
        background: rgba(239, 68, 68, 0.3);
        color: #fee2e2;
    }

    /* Arrow indicator */
    .list-card-arrow {
        font-size: 20px;
        color: var(--ui-neutral);
        opacity: 0.5;
        flex-shrink: 0;
    }

    /* Empty State */
    .screen-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: var(--space-8);
        text-align: center;
        height: 100%;
    }

    .screen-empty-icon {
        font-size: 64px;
        margin-bottom: var(--space-4);
        opacity: 0.3;
    }

    .screen-empty-title {
        font-size: var(--text-lg);
        font-weight: 600;
        color: var(--ui-neutral);
        margin-bottom: var(--space-2);
    }

    .screen-empty-text {
        font-size: var(--text-sm);
        color: var(--ui-neutral);
        opacity: 0.7;
    }
}

/* ============================================
   Desktop Mode (≥ 1024px)
   ============================================ */

@media (min-width: 1024px) {

    /* Entities Sidebar (Desktop Left Sidebar) */
    .entities-sidebar {
        position: fixed;
        left: 0;
        top: 48px;
        /* Below top bar */
        width: 280px;
        height: calc(100vh - 48px);
        background: var(--gradient-panel);
        border-right: 2px solid rgba(100, 100, 150, 0.3);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
        z-index: var(--z-sidebar);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Header */
    .entities-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-4);
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
    }

    .entities-sidebar-title {
        font-size: var(--text-lg);
        font-weight: bold;
        color: #fff;
        margin: 0;
    }

    /* Content */
    .entities-sidebar-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--space-2);
        /* Custom scrollbar */
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    .entities-sidebar-content::-webkit-scrollbar {
        width: 6px;
    }

    .entities-sidebar-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .entities-sidebar-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

    .entities-sidebar-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    /* Section */
    .entities-section {
        margin-bottom: var(--space-4);
    }

    .entities-section-header {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        padding: var(--space-2);
        font-size: var(--text-sm);
        font-weight: 600;
        color: var(--ui-neutral);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .entities-section-icon {
        font-size: 18px;
    }

    .entities-sidebar .entities-section-action,
    .screen-action-btn {
        width: 32px;
        height: 32px;
        margin-left: auto;
        background: rgba(124, 92, 219, 0.2);
        border: 1px solid rgba(124, 92, 219, 0.4);
        border-radius: 6px;
        color: #7c5cdb;
        font-size: 16px;
        cursor: pointer;
        transition: all var(--duration-fast) ease;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        pointer-events: auto;
    }

    .entities-section-action:hover {
        background: rgba(124, 92, 219, 0.3);
        transform: scale(1.05);
    }

    .entities-section-action:active {
        transform: scale(0.95);
    }

    /* Entity List */
    .entities-list {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
    }

    /* Entity Item */
    .entity-item {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        padding: var(--space-2);
        background: var(--gradient-card);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        cursor: pointer;
        transition: all var(--duration-fast) ease;
    }

    .entity-item:hover {
        background: var(--bg-elevated);
        border-color: rgba(124, 92, 219, 0.4);
        transform: translateX(4px);
    }

    .entity-item-icon {
        font-size: 24px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .entity-item-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .entity-item-name {
        font-size: var(--text-sm);
        font-weight: 600;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .entity-item-stats {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        font-size: var(--text-xs);
        color: var(--ui-neutral);
    }

    .entity-item-stats span {
        display: flex;
        align-items: center;
        gap: 2px;
    }

    /* HP Bar */
    .entity-item-hp-bar {
        height: 3px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
        overflow: hidden;
        margin-top: 2px;
    }

    .entity-item-hp-fill {
        height: 100%;
        background: var(--ui-success);
        border-radius: 2px;
        transition: width var(--duration-normal) ease;
    }

    /* State Badge */
    .entity-item-state {
        font-size: var(--text-xs);
        margin-top: 2px;
    }

    .entity-item-location {
        font-size: var(--text-xs);
        color: var(--ui-neutral);
        opacity: 0.5;
        margin-top: 2px;
    }

    /* Empty State */
    .entities-empty {
        padding: var(--space-4);
        text-align: center;
        font-size: var(--text-sm);
        color: var(--ui-neutral);
        opacity: 0.7;
    }

    /* Hide mobile screens on desktop */
    .screen {
        display: none !important;
    }

    /* More dropdown menu */
    .more-dropdown {
        position: fixed;
        top: 56px;
        right: 16px;
        background: var(--gradient-card);
        border: 1px solid rgba(100, 100, 150, 0.3);
        border-radius: var(--radius-md);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: var(--z-modal);
        min-width: 200px;
        padding: var(--space-1);
    }

    .more-dropdown-item {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        padding: var(--space-2) var(--space-3);
        cursor: pointer;
        border-radius: var(--radius-sm);
        transition: background var(--duration-fast);
        color: #fff;
        font-size: var(--text-sm);
    }

    .more-dropdown-item:hover {
        background: rgba(100, 150, 255, 0.2);
    }

    .more-dropdown-icon {
        font-size: 16px;
        width: 20px;
        text-align: center;
    }

    .more-dropdown-lang {
        justify-content: space-between;
        cursor: default;
    }

    .more-dropdown-lang:hover {
        background: transparent;
    }

    .more-dropdown-lang-buttons {
        display: flex;
        gap: var(--space-1);
    }

    .more-dropdown-lang-btn {
        padding: 4px 12px;
        background: rgba(100, 100, 150, 0.2);
        border: 1px solid rgba(100, 100, 150, 0.3);
        border-radius: var(--radius-sm);
        color: #fff;
        font-size: var(--text-xs);
        font-weight: 600;
        cursor: pointer;
        transition: all var(--duration-fast);
    }

    .more-dropdown-lang-btn:hover {
        background: rgba(100, 100, 150, 0.3);
    }

    .more-dropdown-lang-btn.active {
        background: var(--gradient-action);
        border-color: rgba(100, 150, 255, 0.5);
    }
}

/* ============================================
   About Modal (Global - all screen sizes)
   ============================================ */

.about-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.about-modal-content {
    background: var(--gradient-panel);
    border: 2px solid rgba(100, 150, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
}

.about-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.about-modal-title {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: bold;
    color: #fff;
}

.about-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--duration-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.about-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.about-modal-body {
    padding: var(--space-4);
}

.about-modal-subtitle {
    margin: 0 0 var(--space-4) 0;
    font-size: var(--text-base);
    color: var(--ui-neutral);
    line-height: 1.5;
}

.about-modal-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4) 0;
}

.about-modal-features li {
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    color: #fff;
}

.about-modal-version {
    margin: 0;
    text-align: center;
    font-size: var(--text-sm);
    color: var(--ui-neutral);
    font-weight: 600;
    padding-top: var(--space-2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Radius tokens (if not in tokens.css)
   ============================================ */
:root {
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

/* ============================================
   Blur tokens (if not in tokens.css)
   ============================================ */
:root {
    --blur-light: blur(10px);
    --blur-medium: blur(20px);
    --blur-heavy: blur(40px);
}