/**
 * Poster Lab Order History Page Styles
 */

/* Order History Container */
.posterlab-order-history-container {
    min-height: 80vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    background: #f9f9f9;
}

.posterlab-order-history-box {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    width: 100%;
    padding: 2.5rem;
}

/* Title and Subtitle */
.posterlab-order-history-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.posterlab-order-history-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0 0 2rem 0;
    text-align: center;
    line-height: 1.6;
}

/* Messages */
.posterlab-order-history-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.posterlab-order-history-message svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.posterlab-order-history-message-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.posterlab-order-history-message.hidden {
    display: none;
}

/* Loading State */
.posterlab-order-history-loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e5;
    border-top-color: #605030;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.posterlab-order-history-loading p {
    color: #666;
    font-size: 1rem;
}

/* Empty State */
.posterlab-order-history-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.posterlab-order-history-empty svg {
    color: #ccc;
    margin-bottom: 1.5rem;
}

.posterlab-order-history-empty h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.5rem 0;
}

.posterlab-order-history-empty p {
    font-size: 1rem;
    color: #666;
    margin: 0 0 1.5rem 0;
}

/* Orders List */
.posterlab-order-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s;
}

.order-item:hover {
    border-color: #d5d5d5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-info {
    flex: 1;
    min-width: 200px;
}

.order-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.25rem 0;
}

.order-date {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.order-status {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

.order-status.on-hold {
    background: #d1ecf1;
    color: #0c5460;
}

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

.order-status.refunded {
    background: #e2e3e5;
    color: #383d41;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

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

.order-detail-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.order-detail-value {
    font-size: 1rem;
    color: #111;
    font-weight: 600;
}

.order-items {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.order-items-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.75rem;
}

.order-item-product {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.order-item-product:last-child {
    margin-bottom: 0;
}

.order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.375rem;
    background: #f0f0f0;
}

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

.order-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 0.25rem 0;
}

.order-item-meta {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

.order-item-total {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.order-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.order-action-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.order-action-btn:hover {
    background: #f9f9f9;
    border-color: #d5d5d5;
}

.order-action-btn-primary {
    background: linear-gradient(90deg, #605030 0%, #C6A665 100%);
    color: white;
    border-color: transparent;
}

.order-action-btn-primary:hover {
    background: linear-gradient(90deg, #705838 0%, #D4B573 100%);
}

.order-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Button */
.posterlab-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.posterlab-btn-primary {
    background: linear-gradient(90deg, #605030 0%, #C6A665 100%);
    color: white;
}

.posterlab-btn-primary:hover {
    background: linear-gradient(90deg, #705838 0%, #D4B573 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .posterlab-order-history-container {
        padding: 1rem;
    }
    
    .posterlab-order-history-box {
        padding: 1.5rem;
    }
    
    .posterlab-order-history-title {
        font-size: 1.5rem;
    }
    
    .posterlab-order-history-subtitle {
        font-size: 0.875rem;
    }
    
    .order-header {
        flex-direction: column;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-action-btn {
        width: 100%;
        justify-content: center;
    }
}

