/**
 * Hide Main Navigation When Settings Page is Active
 * This creates more space for the settings content and avoids redundant navigation
 */

/* Hide main nav when settings is active */
body.tk-area-settings-active .tk-admin-nav,
.tk-admin-nav:has(#tk-settings.tk-active) {
    display: none !important;
}

/* Alternative: Slide out animation */
.tk-area-settings.tk-active ~ .tk-admin-nav,
.tk-admin-nav.settings-hidden {
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* When settings area is shown, hide the main nav */
.tk-main:has(.tk-area-settings.tk-active) .tk-admin-nav {
    display: none !important;
}

/* Adjust content area when nav is hidden */
.tk-main:has(.tk-area-settings.tk-active) .tk-admin-container {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Make settings area full width when nav is hidden */
.tk-area-settings.tk-active {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Smooth transition for content area */
.tk-admin-container {
    transition: margin-left 0.3s ease, padding-left 0.3s ease;
}

/* Add a back button to return to main navigation */
.tk-area-settings .tk-back-to-nav {
    position: fixed;
    top: 10px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tk-area-settings .tk-back-to-nav:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.tk-area-settings .tk-back-to-nav i {
    color: #4b5563;
    font-size: 18px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    /* On mobile, nav is usually hidden anyway */
    .tk-admin-nav {
        display: none !important;
    }
    
    .tk-area-settings .tk-back-to-nav {
        display: none; /* Hide back button on mobile as nav is accessed differently */
    }
}