/**
 * Orders Page Styles
 */

.orders-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.orders-header {
    text-align: center;
    margin-bottom: 30px;
}

.orders-header h2 {
    font-size: 28px;
    color: #0f52ba;
    margin-bottom: 8px;
}

.orders-subtitle {
    color: #666;
    font-size: 14px;
}

/* Tabs */
.orders-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    border: 2px solid #0f52ba;
    background: white;
    color: #0f52ba;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #f0f5ff;
}

.tab-btn.active {
    background: #0f52ba;
    color: white;
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0f52ba, #1a6dd9);
    color: white;
}

.order-number {
    font-size: 14px;
    font-weight: 600;
    font-family: monospace;
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.status-success {
    background: #4CAF50;
    color: white;
}

.status-failed {
    background: #f44336;
    color: white;
}

.status-refunded {
    background: #FF9800;
    color: white;
}

.status-default {
    background: #9E9E9E;
    color: white;
}

.order-card-body {
    padding: 20px;
}

.order-amount {
    font-size: 28px;
    font-weight: 700;
    color: #0f52ba;
    margin-bottom: 8px;
}

.order-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    min-height: 20px;
}

.order-date {
    color: #999;
    font-size: 12px;
}

.order-card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
}

.order-action-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pay-btn {
    background: linear-gradient(135deg, #0f52ba, #1a6dd9);
    color: white;
}

.pay-btn:hover {
    background: linear-gradient(135deg, #0a428a, #1456b8);
}

.query-btn {
    background: #f0f5ff;
    color: #0f52ba;
}

.query-btn:hover {
    background: #e0ebff;
}

.detail-btn {
    background: #f5f5f5;
    color: #666;
}

.detail-btn:hover {
    background: #e8e8e8;
}

/* Empty State */
.orders-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.orders-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.orders-empty p {
    font-size: 16px;
}

/* Order Detail Modal */
.order-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

.order-detail-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Order Detail Content */
.order-detail-content .detail-section {
    margin-bottom: 20px;
}

.order-detail-content .detail-section h4 {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.order-detail-content .detail-value {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.order-detail-content .detail-value.amount {
    font-size: 24px;
    font-weight: 700;
    color: #0f52ba;
}

.order-detail-actions {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #0f52ba;
    color: white;
}

.btn-primary:hover {
    background: #0a428a;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* Responsive */
@media (max-width: 768px) {
    .orders-container {
        padding: 16px;
    }

    .orders-header h2 {
        font-size: 24px;
    }

    .orders-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }

    .order-card-footer {
        flex-direction: column;
    }
}
