/* Apple-Style Navigation Bar */

/* Desktop Sidebar Theme Section */
.sidebar-theme-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.sidebar-theme-container:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark .sidebar-theme-container:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-theme-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sidebar-theme-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}

.dark .sidebar-theme-icon {
    color: #9ca3af;
}

.sidebar-theme-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-theme-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sidebar-theme-label {
    font-size: 15px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.2;
}

.dark .sidebar-theme-label {
    color: #9ca3af;
}

.sidebar-theme-subtitle {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
    line-height: 1.2;
}

.dark .sidebar-theme-subtitle {
    color: #6b7280;
}

.sidebar-theme-toggle-button {
    width: 56px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Desktop Sidebar */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 0 8px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 15px;
    font-weight: 400;
}

.dark .nav-item {
    color: #9ca3af;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111827;
}

.dark .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 500;
}

.dark .nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #3b82f6;
    border-radius: 0 2px 2px 0;
}

.dark .nav-item.active::before {
    background: #60a5fa;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
}

/* Mobile Bottom Navigation */
.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    min-width: 60px;
    flex: 1;
    max-width: 80px;
}

.dark .nav-item-mobile {
    color: #9ca3af;
}

.nav-item-mobile:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111827;
}

.dark .nav-item-mobile:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

.nav-item-mobile.active {
    color: #3b82f6;
}

.dark .nav-item-mobile.active {
    color: #60a5fa;
}

.nav-item-mobile.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px 2px 0 0;
}

.dark .nav-item-mobile.active::after {
    background: #60a5fa;
}

.nav-icon-mobile {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-label-mobile {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

/* Active state animation */
.nav-item:active,
.nav-item-mobile:active {
    transform: scale(0.98);
}

/* Safe area for mobile (notched devices) */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Smooth transitions */
.nav-item,
.nav-item-mobile {
    -webkit-tap-highlight-color: transparent;
}

/* Focus states for accessibility */
.nav-item:focus-visible,
.nav-item-mobile:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dark .nav-item:focus-visible,
.dark .nav-item-mobile:focus-visible {
    outline-color: #60a5fa;
}

/* Sidebar scrollbar styling (optional) */
nav::-webkit-scrollbar {
    width: 6px;
}

nav::-webkit-scrollbar-track {
    background: transparent;
}

nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dark nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dark nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Theme Toggle Styling */
.theme-toggle-mobile {
    padding: 4px 8px !important;
    min-width: 60px;
    max-width: 80px;
    background: transparent !important;
    border: none;
    cursor: pointer;
}

.theme-toggle-mobile:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.dark .theme-toggle-mobile:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.theme-toggle-track-mobile {
    position: relative;
    width: 40px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0 auto 2px;
}

.dark .theme-toggle-track-mobile {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-toggle-slider-mobile {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .theme-toggle-slider-mobile {
    background: #1c1c1e;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Slider positions for mobile toggle */
.theme-toggle-slider-mobile[data-theme="light"] {
    transform: translateX(0);
}

.theme-toggle-slider-mobile[data-theme="dark"] {
    transform: translateX(20px);
}

.theme-toggle-slider-mobile[data-theme="system"] {
    transform: translateX(10px);
}

.theme-toggle-mobile .nav-icon-mobile {
    width: 10px;
    height: 10px;
    color: #666;
    margin: 0;
}

.dark .theme-toggle-mobile .nav-icon-mobile {
    color: #999;
}

/* Remove active state styling for theme toggle mobile */
.theme-toggle-mobile.active::after {
    display: none;
}

.theme-toggle-mobile .nav-label-mobile {
    margin-top: 0;
}

/* More Modal Sheet - Apple Style */
.more-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.more-modal.active {
    pointer-events: all;
    opacity: 1;
}

.more-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.more-modal.active .more-modal-backdrop {
    opacity: 1;
}

.more-modal-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dark .more-modal-sheet {
    background: #1c1c1e;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.more-modal.active .more-modal-sheet {
    transform: translateY(0);
}

.more-modal-handle {
    width: 36px;
    height: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    margin: 12px auto 8px;
    flex-shrink: 0;
}

.dark .more-modal-handle {
    background: rgba(255, 255, 255, 0.3);
}

.more-modal-header {
    padding: 8px 20px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.dark .more-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.more-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.dark .more-modal-title {
    color: #f3f4f6;
}

.more-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.more-modal-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: #111827;
    font-size: 16px;
}

.dark .more-modal-item {
    color: #f3f4f6;
}

.more-modal-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.dark .more-modal-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.more-modal-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #6b7280;
    flex-shrink: 0;
}

.dark .more-modal-item-icon {
    color: #9ca3af;
}

.more-modal-item-icon svg {
    width: 22px;
    height: 22px;
}

.more-modal-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.more-modal-item-label {
    font-size: 16px;
    font-weight: 400;
    color: #111827;
}

.dark .more-modal-item-label {
    color: #f3f4f6;
}

.more-modal-item-subtitle {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

.dark .more-modal-item-subtitle {
    color: #9ca3af;
}

.more-modal-item-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    flex-shrink: 0;
}

.dark .more-modal-item-arrow {
    color: #6b7280;
}

.more-modal-item-arrow svg {
    width: 16px;
    height: 16px;
}

.more-modal-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 8px 20px;
}

.dark .more-modal-divider {
    background: rgba(255, 255, 255, 0.1);
}

/* Theme Toggle in Modal */
.more-modal-item-theme {
    cursor: default;
}

.more-modal-theme-toggle {
    width: 56px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.more-modal-theme-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dark .more-modal-theme-track {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.more-modal-theme-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .more-modal-theme-slider {
    background: #1c1c1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.more-modal-theme-slider[data-theme="light"] {
    transform: translateX(0);
}

.more-modal-theme-slider[data-theme="dark"] {
    transform: translateX(28px);
}

.more-modal-theme-slider[data-theme="system"] {
    transform: translateX(14px);
}

.more-modal-theme-icon {
    width: 14px;
    height: 14px;
    color: #666;
    transition: color 0.2s ease;
}

.dark .more-modal-theme-icon {
    color: #999;
}

/* Smooth scrollbar for modal content */
.more-modal-content::-webkit-scrollbar {
    width: 6px;
}

.more-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.more-modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dark .more-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.more-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dark .more-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

