/* Business Dashboard - New Layout Styles */

/* Hide h1.entry-title */
h1.entry-title {
    display: none !important;
}

/* Hide mobile menu toggle */
.mobile-menu-toggle {
    display: none !important;
}

/* Remove order history page left padding */
.order-history-page {
    padding-left: 20px !important;
}

/* Remove restaurant contests left padding */
.localbuzz-restaurant-contests.localbuzz-business-dashboard {
    padding-left: 20px !important;
}

/* Hide shopengine sticky fly cart (not part of plugin) */
.shopengine-sticky-fly-cart--fixed-cart {
    display: none !important;
}

/* Hide "View Orders" from hamburger menu */
.business-nav-item[data-page-key="orders"] {
    display: none !important;
}

/* Ensure mobile-menu-toggle is hidden */
.mobile-menu-toggle {
    display: none !important;
}

/* Hide entry-header */
.entry-header {
    display: none !important;
}

/* Main Layout Container */
.business-dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}

/* Sidebar Styles */
.business-dashboard-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    border-right: 1px solid #e8e8e8;
}

/* Custom scrollbar for sidebar */
.business-dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.business-dashboard-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.business-dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.business-dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.business-dashboard-sidebar .sidebar-logo {
    padding: 28px 20px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.business-dashboard-sidebar .sidebar-logo img {
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.business-dashboard-sidebar .sidebar-logo img:hover {
    opacity: 1;
}

.business-dashboard-sidebar .sidebar-nav {
    padding: 16px 0 24px;
}

.business-dashboard-sidebar .nav-section {
    margin-bottom: 28px;
}

.business-dashboard-sidebar .nav-section:last-child {
    margin-bottom: 0;
}

.business-dashboard-sidebar .nav-section-title {
    padding: 0 20px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
}

.business-dashboard-sidebar .nav-item {
    display: flex;
    align-items: center;
    padding: 11px 20px 11px 24px;
    color: #4a4a4a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
    margin: 2px 0;
}

.business-dashboard-sidebar .nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ff6b35;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.business-dashboard-sidebar .nav-item:hover {
    background: linear-gradient(90deg, #fff5f2 0%, #fff 100%);
    color: #ff6b35;
    padding-left: 28px;
}

.business-dashboard-sidebar .nav-item:hover::before {
    transform: scaleY(1);
}

.business-dashboard-sidebar .nav-item.active {
    background: linear-gradient(90deg, #fff5f2 0%, #fff 100%);
    color: #ff6b35;
    border-left-color: #ff6b35;
    font-weight: 600;
    padding-left: 28px;
}

.business-dashboard-sidebar .nav-item.active::before {
    transform: scaleY(1);
}

.business-dashboard-sidebar .nav-item-icon {
    width: 22px;
    height: 22px;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.business-dashboard-sidebar .nav-item:hover .nav-item-icon {
    transform: scale(1.1);
}

.business-dashboard-sidebar .nav-item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.business-dashboard-sidebar .nav-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e0e0e0 20%, #e0e0e0 80%, transparent 100%);
    margin: 20px 20px;
}

/* Main Content Area */
.business-dashboard-main {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-main-header {
    margin-bottom: 30px;
}

.dashboard-main-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #292828;
    margin: 0 0 8px;
}

.dashboard-main-header p {
    color: #666;
    margin: 0;
}

/* Summary Cards Grid */
.dashboard-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-summary-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.dashboard-summary-card .card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-summary-card .card-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.dashboard-summary-card.orders-today .card-value {
    color: #3498db;
}

.dashboard-summary-card.active-orders .card-value {
    color: #f39c12;
}

.dashboard-summary-card.revenue-today .card-value {
    color: #27ae60;
}

.dashboard-summary-card.menu-items .card-value {
    color: #9b59b6;
}

/* Action Buttons */
.dashboard-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.dashboard-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.dashboard-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dashboard-action-btn.menu-builder {
    background: #3498db;
}

.dashboard-action-btn.view-orders {
    background: #27ae60;
}

.dashboard-action-btn.manage-locations {
    background: #f39c12;
}

.dashboard-action-btn.delivery-settings {
    background: #9b59b6;
}

/* Recent Orders Section */
.dashboard-recent-orders {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
}

.dashboard-recent-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-recent-orders-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #292828;
    margin: 0;
}

.dashboard-recent-orders-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dashboard-recent-orders-filters select,
.dashboard-recent-orders-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.dashboard-recent-orders-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Card Layout - Hidden on Desktop */
.dashboard-recent-orders-cards {
    display: none;
}

.dashboard-order-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.order-card-header strong {
    font-size: 14px;
    color: #333;
}

.order-card-body {
    margin-bottom: 10px;
}

.order-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.order-card-row:last-child {
    margin-bottom: 0;
}

.order-card-label {
    color: #666;
    font-weight: 500;
}

.order-card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.dashboard-recent-orders-cards .dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0;
    width: auto;
    min-width: auto;
    transition: all 0.2s ease;
}

.dashboard-recent-orders-cards .dashboard-action-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
    transform: none;
    box-shadow: none;
}

.dashboard-recent-orders-cards .dashboard-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.dashboard-recent-orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 450px;
}

.dashboard-recent-orders-table thead {
    background: #f8f9fa;
}

.dashboard-recent-orders-table th {
    padding: 6px 2px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.dashboard-recent-orders-table td {
    padding: 8px 2px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
}

.dashboard-recent-orders-table .view-order-cell {
    text-align: center;
    width: 40px;
    padding: 8px 2px;
}

.dashboard-recent-orders-table .action-order-cell {
    text-align: center;
    padding: 8px 4px;
    white-space: nowrap;
}

.dashboard-order-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.dashboard-action-btn-small {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 45px;
}

.dashboard-action-btn-small:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
}

.dashboard-action-btn-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 24px;
}

.dashboard-action-btn-check:hover {
    background: #229954;
    transform: scale(1.05);
}

.dashboard-action-btn-check svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
}

.order-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.dashboard-recent-orders-table .dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0;
    width: auto;
    min-width: auto;
    transition: all 0.2s ease;
}

.dashboard-recent-orders-table .dashboard-action-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
    transform: none;
    box-shadow: none;
}

.dashboard-recent-orders-table .dashboard-action-btn svg {
    width: 16px;
    height: 16px;
}

.dashboard-recent-orders-table tbody tr:hover {
    background: #f8f9fa;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.order-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status-badge.processing {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.order-status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.dashboard-view-all-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #dc3545;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dashboard-view-all-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Orders Pagination */
.dashboard-orders-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.dashboard-orders-pagination .pagination-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.dashboard-orders-pagination .pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-orders-pagination .pagination-link:hover {
    background: #e8e8e8;
}

.dashboard-orders-pagination .pagination-link.active {
    background: #ff6b35;
    color: #fff;
    pointer-events: none;
}

/* Loading State */
.dashboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
}

.dashboard-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.dashboard-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #d32f2f;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

/* No Orders State */
.dashboard-no-orders {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #666;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .business-dashboard-sidebar {
        transform: translateX(-100%);
        width: 300px;
    }
    
    .business-dashboard-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .business-dashboard-main {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-sidebar-overlay.active {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        margin-bottom: 20px;
        font-size: 20px;
        color: #333;
    }
    
    .dashboard-summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dashboard-action-buttons {
        grid-template-columns: 1fr;
    }
    
    .dashboard-recent-orders-table-container {
        overflow-x: visible;
        margin: 0;
        padding: 0;
    }
    
    .dashboard-recent-orders-table {
        display: none;
    }
    
    .dashboard-recent-orders-cards {
        display: block;
    }
    
    .dashboard-recent-orders-table th {
        padding: 6px 2px;
        font-size: 11px;
    }
    
    .dashboard-recent-orders-table td {
        padding: 8px 2px;
        font-size: 12px;
    }
    
    .dashboard-recent-orders-table .view-order-cell {
        width: 40px;
        padding: 8px 2px;
    }
    
    .dashboard-recent-orders-table .action-order-cell {
        padding: 8px 4px;
    }
    
    .dashboard-order-actions {
        gap: 3px;
    }
    
    .dashboard-action-btn-small {
        padding: 3px 6px;
        font-size: 10px;
        min-width: 40px;
    }
    
    .dashboard-action-btn-check {
        padding: 3px 5px;
        min-width: 24px;
        height: 22px;
    }
    
    .dashboard-action-btn-check svg {
        width: 12px;
        height: 12px;
    }
    
    .order-card-actions {
        gap: 4px;
        margin-top: 8px;
    }
    
    .dashboard-recent-orders-table .order-status-badge {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .dashboard-recent-orders-table .dashboard-action-btn {
        padding: 4px 6px;
        font-size: 0;
    }
    
    .dashboard-recent-orders-table .dashboard-action-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .dashboard-order-card {
        padding: 14px;
        margin-bottom: 14px;
    }
    
    .order-card-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .order-card-body {
        margin-bottom: 12px;
    }
    
    .order-card-row {
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .order-card-footer {
        padding-top: 10px;
    }
    
    .dashboard-recent-orders-cards .dashboard-action-btn {
        padding: 6px 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: #666;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-decoration: none;
        font-size: 0;
        width: auto;
        min-width: auto;
    }
    
    .dashboard-recent-orders-cards .dashboard-action-btn svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
    }
    
    .dashboard-recent-orders-cards .dashboard-action-btn:hover {
        background: #f5f5f5;
        border-color: #bbb;
        color: #333;
    }
}

