/**
 * Omni-Commerce Dashboard Styles
 * Comprehensive dashboard layout and sidebar styling
 */

/* Dashboard Wrapper - Flexbox layout */
.omni-dashboard-wrapper {
    display: flex;
    gap: 24px;
    padding: 1rem;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

/* Main dashboard content area */
.omni-dashboard-main {
    flex: 1;
    min-width: 0; /* Allows flex to shrink below content width */
    width: 100%;
}

/* Dashboard sidebar - Fixed width, doesn't overlap */
.omni-dashboard-sidebar {
    flex-shrink: 0;
    width: 280px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.omni-dashboard-sidebar nav {
    position: sticky;
    top: 1rem;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .omni-dashboard-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .omni-dashboard-sidebar {
        width: 100%;
        max-height: none;
    }

    .omni-dashboard-sidebar nav {
        position: static;
    }
}

/* Dashboard menu items */
.omni-dashboard-menu-item {
    list-style: none;
    margin: 0;
}

.omni-dashboard-menu-item button,
.omni-dashboard-menu-item a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
}

.omni-dashboard-menu-item button:hover,
.omni-dashboard-menu-item a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.omni-dashboard-menu-item button:focus,
.omni-dashboard-menu-item a:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

/* Submenu toggle button */
.omni-dashboard-menu-item button {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.omni-dashboard-menu-item button .dashicons {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Submenu styling */
.submenu {
    margin-left: 1rem;
    margin-top: 0.25rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e5e7eb;
    list-style: none;
    padding: 0;
}

.submenu.hidden {
    display: none;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding: 0.5rem !important;
    font-size: 0.8125rem;
}

/* Top cards grid */
.omni-top-cards {
    margin-bottom: 1.5rem;
}

/* Slider container */
.omni-slider-container {
    width: 100%;
}

.omni-slider-wrapper {
    overflow: hidden;
    width: 100%;
}

.omni-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.omni-slider-slide {
    flex: 0 0 100%;
    width: 100%;
}

.omni-slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.omni-slider-dot.bg-blue-600 {
    background-color: #2563eb !important;
}

/* Quick services grid */
.omni-top-cards,
.omni-bottom-ads {
    margin-bottom: 1.5rem;
}

/* Responsive grids */
@media (max-width: 640px) {
    .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .grid.grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    .grid.grid-cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .grid.grid-cols-6 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Glass effect for dashboard components */
.glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Smooth animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.omni-dashboard-main > div {
    animation: slideIn 0.3s ease;
}

/* Topbar styling */
header.mb-6 {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Ensure no overflow on content */
.omni-dashboard-wrapper * {
    box-sizing: border-box;
}

/* Print styles */
@media print {
    .omni-dashboard-sidebar {
        display: none;
    }

    .omni-dashboard-wrapper {
        display: block;
    }

    .omni-dashboard-main {
        width: 100%;
    }
}
