/* backend/static/css/modules/navigation.css */

/* --- Navigation Items (Sidebar) --- */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 0.15rem;
    position: relative;
}

/* Left accent bar for active/hover (hidden by default) */
.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary, var(--color-primary-dark)));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.nav-item:hover { 
    background-color: rgba(var(--color-primary-rgb), 0.06); 
    color: var(--color-text);
    transform: translateX(3px); 
}

.nav-item:hover .nav-icon {
    transform: scale(1.08);
}

.nav-item.active { 
    background-color: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary-dark); 
    font-weight: 700;
    border-color: rgba(var(--color-primary-rgb), 0.15);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.08);
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

.nav-icon { 
    width: 22px;
    height: 22px; 
    flex-shrink: 0; 
    stroke-width: 2;
    color: inherit;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}

.nav-item.active .nav-icon {
    color: var(--color-primary);
}

/* --- Category Headers --- */
.nav-category {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1.5rem 0 0.5rem 0.25rem;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Decorative line after category label */
.nav-category::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--color-border-rgb), 0.5), transparent);
    margin-right: 0.5rem;
}

.nav-category:first-child {
    margin-top: 0.25rem;
}

/* --- Tab Bar (Mobile) - Ultra Subtle (Focus on Content) --- */
.tab-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 1rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    
    /* Subtle Translucency (Frosted Glass) */
    background: rgba(var(--color-surface-rgb), 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(var(--color-border-rgb), 0.3);
    
    order: 1;
    flex-shrink: 0; 
    flex-grow: 0;
    z-index: 100;
    height: calc(3.5rem + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .tab-bar { display: none; }
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-decoration: none;
    min-width: 50px; 
    min-height: 44px;
    transition: all 0.25s ease;
    position: relative;
    opacity: 0.45;
    flex: 0 1 auto;
    background: transparent;
}

/* Hide Text Labels on Mobile */
.tab-item span {
    display: none;
}

.tab-item:active {
    transform: scale(0.9);
    opacity: 0.7;
}

.tab-item.active { 
    color: var(--color-primary); 
    opacity: 1;
}

/* Active dot indicator */
.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(var(--color-primary-rgb), 0.5);
}

.tab-item svg { 
    width: 26px; 
    height: 26px; 
    stroke-width: 1.8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-item.active svg {
    transform: translateY(-2px);
    stroke-width: 2.2px;
}

/* Theme Toggle Icons Visibility */
[data-theme="light"] #theme-icon-sun { display: none; }
[data-theme="dark"] #theme-icon-moon { display: none; }

/* --- Patient Preview Toggle --- */
.preview-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
}

.preview-toggle-btn .toggle-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.preview-toggle-btn .toggle-label {
    flex: 1;
    text-align: left;
    line-height: 1.3;
}

.preview-toggle-btn .toggle-hint {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 1px;
}

/* Enter Preview (default/idle state) */
.preview-toggle-btn--enter {
    background: rgba(var(--color-primary-rgb, 29, 78, 216), 0.06);
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb, 29, 78, 216), 0.15);
}
.preview-toggle-btn--enter:hover {
    background: rgba(var(--color-primary-rgb, 29, 78, 216), 0.12);
    border-color: rgba(var(--color-primary-rgb, 29, 78, 216), 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb, 29, 78, 216), 0.1);
}

/* Exit Preview (active/simulator state) */
.preview-toggle-btn--exit {
    background: rgba(var(--color-error-rgb, 220, 38, 38), 0.08);
    color: var(--color-error);
    border-color: rgba(var(--color-error-rgb, 220, 38, 38), 0.2);
}
.preview-toggle-btn--exit:hover {
    background: rgba(var(--color-error-rgb, 220, 38, 38), 0.15);
    border-color: rgba(var(--color-error-rgb, 220, 38, 38), 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-error-rgb, 220, 38, 38), 0.12);
}

/* Preview mode active indicator bar */
.preview-mode-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(var(--color-warning-rgb, 245, 158, 11), 0.1);
    border: 1px solid rgba(var(--color-warning-rgb, 245, 158, 11), 0.25);
    border-radius: 8px;
    font-size: 0.72rem;
    color: var(--color-warning, #f59e0b);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.preview-mode-banner .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-warning, #f59e0b);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}
