/* Orders Page Specific Styles */

/* Order ID Section with Copy Button */
.order-id-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.order-id-text {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.copy-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.copy-btn i {
    font-size: 0.875rem;
}

/* Legacy copyable order ID styling for backward compatibility */
.copyable-order-id {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 6px;
    position: relative;
}

.copyable-order-id:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: translateY(-1px);
}

.copyable-order-id:active {
    transform: translateY(0);
}

/* Status Color Coding */
.status-badge.redeemed,
.card-status.status-redeemed,
.status-redeemed .status-icon {
    color: #dc2626 !important;
    background-color: rgba(220, 38, 38, 0.1) !important;
    border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

.status-badge.active,
.card-status.status-active,
.status-active .status-icon {
    color: #059669 !important;
    background-color: rgba(5, 150, 105, 0.1) !important;
    border: 1px solid rgba(5, 150, 105, 0.3) !important;
}

.status-badge.expired,
.card-status.status-expired,
.status-expired .status-icon {
    color: #dc2626 !important;
    background-color: rgba(220, 38, 38, 0.2) !important;
    border: 1px solid rgba(220, 38, 38, 0.4) !important;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.15) !important;
}

/* Gift Card Status Styling */
.gift-card.status-redeemed {
    border-left: 4px solid #dc2626 !important;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.02)) !important;
}

.gift-card.status-active {
    border-left: 4px solid #059669 !important;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05), rgba(5, 150, 105, 0.02)) !important;
}

.gift-card.status-expired {
    border-left: 4px solid #dc2626 !important;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05)) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15) !important;
}

.card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: var(--shadow-lg);
}

.header-content h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.header-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.header-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.header-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.orders-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.order-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.order-date, .order-total {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-total {
    font-weight: 600;
    color: var(--primary);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--success);
    color: white;
}

.gift-cards-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gift-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.gift-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.gift-card.status-active {
    border-left: 4px solid var(--success);
}

.gift-card.status-redeemed {
    border-left: 4px solid var(--info);
    opacity: 0.8;
}

.gift-card.status-expired {
    border-left: 4px solid var(--error);
    opacity: 0.7;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-type {
    font-weight: 600;
    color: var(--text-primary);
}

.card-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.card-code {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.code-text {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: 1px;
    flex: 1;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.countdown-section {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border-radius: var(--radius);
    text-align: center;
}

.countdown-label {
    display: block;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.1rem;
}

.countdown-timer span {
    background: rgba(146, 64, 14, 0.1);
    padding: 0.5rem;
    border-radius: var(--radius);
    min-width: 40px;
    text-align: center;
    color: #92400e;
}

.countdown-timer.warning {
    background: linear-gradient(135deg, #fed7aa, #fb923c);
}

.countdown-timer.warning span {
    background: rgba(194, 65, 12, 0.1);
    color: #c2410c;
}

.countdown-timer.critical {
    background: linear-gradient(135deg, #fecaca, #ef4444);
    animation: pulse 2s infinite;
}

.countdown-timer.critical span {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.countdown-timer.expired span,
.countdown-timer .expired {
    background: var(--error);
    color: white;
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.redemption-info {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 4px solid var(--info);
}

.redemption-info p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wallet-info, .transaction-info {
    margin: 0.5rem 0;
}

.wallet-label, .tx-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.25rem;
}

.wallet-address-container, .transaction-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.wallet-address, .tx-link {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    flex: 1;
    word-break: break-all;
}

.tx-link {
    text-decoration: none;
    color: var(--primary);
}

.tx-link:hover {
    text-decoration: underline;
}

.copy-wallet-btn, .copy-tx-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.copy-wallet-btn:hover, .copy-tx-btn:hover {
    background: #0ea5e9;
    transform: scale(1.05);
}

.card-actions {
    margin-top: 1rem;
}

.redeem-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.redeem-btn:hover:not(.disabled) {
    background: #059669;
    transform: translateY(-1px);
}

.redeem-btn.disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.order-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.order-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .orders-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .order-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .card-code {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .countdown-timer {
        gap: 0.5rem;
        font-size: 1rem;
    }

    .countdown-timer span {
        min-width: 35px;
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .order-actions {
        flex-direction: column;
    }

    .order-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .wallet-address-container, .transaction-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.empty-state .btn {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.empty-state .btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}