/* Order History Page Styles */
.order-history-section {
    background-color: #f9f9f9;
    min-height: 80vh;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
}

.mobile-menu-toggle i {
    display: block;
}

/* Mobile Account Header */
.mobile-account-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #f0f0f0;
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-user-details h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #1f2937;
}

.mobile-user-details p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

/* Account Sidebar */
.account-sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.account-user {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.account-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.account-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.account-menu {
    display: flex;
    flex-direction: column;
}

.account-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.account-menu-item i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.account-menu-item:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
}

.account-menu-item.active {
    background-image: linear-gradient(to right, #3b82f6, #0d9488);
    color: white;
}

.account-menu-item.logout {
    margin-top: 20px;
    color: #ef4444;
}

.account-menu-item.logout:hover {
    background-color: #fef2f2;
}

/* Order History Content */
.order-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.order-history-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.order-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.order-search {
    position: relative;
    width: 250px;
}

.order-search input {
    padding-right: 40px;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

/* Orders List */
.orders-list {
    margin-bottom: 30px;
}

.order-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.order-item:hover {
    transform: translateY(-5px);
}

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

.order-id {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
}

.order-header-right {
    text-align: right;
}

.order-status {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.order-status.delivered .status-dot {
    background-color: #10b981;
}

.order-status.delivered {
    color: #10b981;
}

.order-status.processing .status-dot {
    background-color: #f59e0b;
}

.order-status.processing {
    color: #f59e0b;
}

.order-status.cancelled .status-dot {
    background-color: #ef4444;
}

.order-status.cancelled {
    color: #ef4444;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 700;
}

.order-products {
    margin-bottom: 15px;
}

.order-product {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-product:last-child {
    border-bottom: none;
}

.order-product-image {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.order-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.order-product:hover .order-product-image img {
    transform: scale(1.1);
}

.order-product-info {
    flex: 1;
}

.order-product-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.order-product-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.order-product-price {
    font-weight: 600;
    font-size: 1.1rem;
    margin-left: 15px;
}

.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-actions .btn {
    transition: all 0.3s ease;
}

.order-actions .btn:hover {
    transform: translateY(-2px);
}

/* Pagination */
.orders-pagination {
    margin-top: 30px;
}

.pagination .page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 5px;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
}

.pagination .page-item.active .page-link {
    background-image: linear-gradient(to right, #3b82f6, #0d9488);
    border-color: transparent;
    color: white;
}

/* Empty Orders State */
.empty-orders {
    text-align: center;
    padding: 60px 0;
}

.empty-orders-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-orders h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.empty-orders p {
    color: #666;
    margin-bottom: 25px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .account-sidebar {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Show mobile account header */
    .mobile-account-header {
        display: flex;
    }
    
    /* Hide desktop sidebar on mobile */
    .account-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .account-sidebar.active {
        left: 0;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Close button for mobile sidebar */
    .mobile-sidebar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #666;
        cursor: pointer;
        padding: 5px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-close:hover {
        background-color: #f5f5f5;
        color: #ef4444;
    }

    .order-history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-filters {
        margin-top: 15px;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .order-search {
        width: 100%;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-header-right {
        margin-top: 10px;
        text-align: left;
    }

    .order-product {
        flex-wrap: wrap;
    }

    .order-product-price {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn {
        width: 100%;
    }
}