/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/


.custom-orders-container {
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

.custom-orders-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    background: white;
    border-radius: 8px 8px 0 0;
    padding: 0 20px;
}

.custom-tab-button {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.custom-tab-button.active {
    color: #333;
    border-bottom-color: #007cba;
}

.custom-tab-content {
    display: none;
    min-height: 200px;
}

.custom-tab-content.active {
    display: block;
}

.tab-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.order-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-status {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #fff3cd;
    border-radius: 4px;
    border-right: 4px solid #ffc107;
}

.order-status.delivered {
    background: #d1edff;
    border-right-color: #28a745;
}

.status-icon {
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 12px;
}

.status-text {
    font-weight: 600;
    color: #333;
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.order-info-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    flex-wrap: wrap;
}

.order-date, .order-total, .order-id {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.order-total {
    font-weight: 600;
    color: #333;
}

.order-details-btn, .view-invoice-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.order-details-btn:hover, .view-invoice-btn:hover {
    background: #005a87;
}

.order-products-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* استایل‌های فاکتور */
.invoice-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 100%;
    overflow-x: hidden;
}

.back-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #545b62;
}

.invoice-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.invoice-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.invoice-date {
    color: #666;
    font-size: 16px;
}

.invoice-sections {
    margin-bottom: 30px;
}

.invoice-section.full-width {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.invoice-section h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    font-size: 18px;
}

/* استایل‌های جدید برای نمایش اطلاعات صورتحساب */
.address-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.address-row {
    display: flex;
    gap: 20px;
}

.address-row.full-width {
    width: 100%;
}

.address-row.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.address-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex: 1;
}

.address-field strong {
    color: #333;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.address-field span {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

/* استایل برای نمایش شماره موبایل میهن پنل */
.address-field span small {
    font-size: 12px;
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

/* استایل‌های جدول محصولات */
.invoice-products {
    margin-bottom: 30px;
}

.invoice-products h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    font-size: 18px;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.invoice-items-table th,
.invoice-items-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #dee2e6;
}

.invoice-items-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007cba;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-item .product-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.product-sku {
    font-size: 12px;
    color: #666;
}

.total-row {
    background: #e7f3ff;
    font-weight: bold;
}

.total-row td {
    border-top: 2px solid #007cba;
    font-size: 16px;
}
small {
    display: none;
}
/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .invoice-container {
        padding: 15px 10px;
    }
    
    /* ریسپانسیو برای اطلاعات صورتحساب */
    .address-row.three-column {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .address-field {
        padding: 12px;
    }
    
    .address-field strong {
        font-size: 13px;
    }
    
    .address-field span {
        font-size: 14px;
    }
    
    /* ریسپانسیو برای جدول محصولات */
    .invoice-items-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 13px;
    }
    
    .invoice-items-table thead {
        display: none;
    }
    
    .invoice-items-table tbody,
    .invoice-items-table tfoot {
        display: block;
        width: 100%;
    }
    
    .invoice-items-table tr {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .invoice-items-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
        white-space: normal;
    }
    
    .invoice-items-table td:last-child {
        border-bottom: none;
    }
    
    .invoice-items-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #333;
        min-width: 120px;
        text-align: right;
        margin-left: 10px;
    }
    
    .product-item {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .product-item .product-image {
        width: 40px;
        height: 40px;
        align-self: flex-start;
    }
}

/* برای موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
    .invoice-header h2 {
        font-size: 20px;
    }
    
    .invoice-date {
        font-size: 14px;
    }
    
    .invoice-section.full-width {
        padding: 15px;
    }
    
    .address-field {
        padding: 10px;
    }
    
    .invoice-items-table {
        font-size: 12px;
    }
    
    .invoice-items-table td {
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .invoice-items-table td::before {
        margin-left: 0;
        min-width: auto;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-item .product-image {
        align-self: center;
    }
}

/* برای تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .address-row.three-column {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .invoice-container {
        padding: 20px 15px;
    }
}

/* رسپانسیو */
@media (max-width: 768px) {
    .custom-orders-tabs {
        flex-direction: column;
        padding: 0;
    }
    
    .custom-tab-button {
        margin: 0;
        border-bottom: 1px solid #eee;
        border-radius: 0;
    }
    
    .order-details {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .invoice-sections {
        grid-template-columns: 1fr;
    }
    
    .invoice-items-table {
        font-size: 14px;
    }
    
    .invoice-items-table th,
    .invoice-items-table td {
        padding: 10px 8px;
    }
}

/* استایل برای حالت خالی */
.no-orders-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 40px 20px;
}

.empty-state {
    text-align: center;
    max-width: 400px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.empty-state p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* بهبود استایل تب‌ها */
.custom-orders-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.custom-tab-button {
    padding: 18px 35px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    margin: 0;
    flex: 1;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.custom-tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,124,186,0.1), transparent);
    transition: left 0.5s ease;
}

.custom-tab-button:hover::before {
    left: 100%;
}

.custom-tab-button:hover {
    color: #495057;
    background: #f8f9fa;
}

.custom-tab-button.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* بهبود استایل کارت‌های سفارش */
.order-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: #ffc107;
    transition: all 0.3s ease;
}

.order-card.delivered-order::before {
    background: #28a745;
}

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

.order-card:hover::before {
    width: 6px;
}

/* بهبود استایل دکمه‌ها */
.order-details-btn, .view-invoice-btn {
    background: linear-gradient(135deg, #28a745 0%, #d4edda 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,124,186,0.3);
    position: relative;
    overflow: hidden;
}

.order-details-btn::before, .view-invoice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.order-details-btn:hover::before, .view-invoice-btn:hover::before {
    left: 100%;
}

.order-details-btn:hover, .view-invoice-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.4);
}

/* بهبود استایل وضعیت سفارش */
.order-status {
    display: inline-flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 16px;
    background: #fff3cd;
    border-radius: 8px;
    border-right: 4px solid #ffc107;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.order-status.delivered {
    background: #d4edda;
    border-right-color: #28a745;
}

.status-icon {
    background: #28a745;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.status-text {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

/* بهبود استایل جزئیات سفارش */
.order-full-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .custom-orders-tabs {
        flex-direction: row;
    }
    
    .custom-tab-button {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .empty-state {
        padding: 30px 20px;
    }
    
    .empty-state-icon {
        font-size: 48px;
    }
    
    .empty-state h3 {
        font-size: 18px;
    }
    
    .empty-state p {
        font-size: 14px;
    }
    
    .order-card {
        padding: 20px;
    }
    
    .order-details {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .order-info-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}