/* Order Management Styles */

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background-color: #fef3c7;
    color: #92400e;
}

.status-delivered {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

.status-paid {
    background-color: #d1fae5;
    color: #065f46;
}

.status-unpaid {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Order Cards */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.order-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.order-date {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.order-summary {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.order-summary-item {
    display: flex;
    flex-direction: column;
}

.order-summary-item .label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.order-summary-item .value {
    font-weight: 600;
}

.order-actions {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
    gap: 10px;
}

/* Order Details */
.order-details {
    margin-top: 20px;
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.order-info-section {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 6px;
}

.order-info-section h3 {
    margin-top: 0;
    font-size: 1rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.order-info-section p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.order-items-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.order-items-table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.product-cell {
    min-width: 250px;
}

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

.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.placeholder-thumbnail {
    width: 50px;
    height: 50px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #9ca3af;
}

.total-row {
    font-weight: 600;
}

.total-cell {
    font-size: 1.1rem;
    color: #111827;
}

.notes-section {
    margin-top: 30px;
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 6px;
}

.notes-section h3 {
    margin-top: 0;
    font-size: 1rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-top: 20px;
}

.empty-state i {
    color: #9ca3af;
    margin-bottom: 15px;
}

.empty-state h3 {
    margin: 0 0 10px;
    color: #4b5563;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .order-info-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        grid-template-columns: 1fr 1fr;
    }
    
    .product-cell {
        min-width: auto;
    }
    
    .order-items-table {
        display: block;
        overflow-x: auto;
    }
    
    .wide-modal {
        width: 95%;
    }
}

/* Status Update Form */
.status-select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
}

.inline-form {
    display: inline;
}

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

.text-center {
    text-align: center;
}

/* Modal size for orders */
.wide-modal {
    width: 80%;
    max-width: 1000px;
}
