/* =============================================================================
   ORDER CARD COMPONENTS
   ============================================================================= */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.orders-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.orders-empty i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.orders-loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* Order Item Card */
.order-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.order-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Order Header */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.order-id {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.order-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Order Pattern */
.order-pattern {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--space-md);
    word-break: break-all;
    letter-spacing: 1px;
}

.order-pattern .prefix {
    color: var(--primary);
    opacity: 0.6;
}

.order-pattern .suffix {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Order Meta */
.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* Command Container */
.cmd-container {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: var(--space-md);
}

.cmd-row {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.cmd-row:hover {
    background: var(--bg-card);
}

.cmd-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.cmd-type {
    flex-shrink: 0;
    width: 42px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px;
    margin-right: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.cmd-text {
    flex: 1;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmd-row:hover .cmd-text {
    color: var(--text-main);
}

.cmd-copy {
    margin-left: var(--space-sm);
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.cmd-row:hover .cmd-copy {
    opacity: 1;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

/* Fulfill Section */
.fulfill-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    display: none;
    animation: slideDown 0.25s ease;
}

.fulfill-section.show {
    display: block;
}

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

.fulfill-input-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.fulfill-input-group input {
    flex: 1;
    min-width: 200px;
}

/* Preview Result */
.preview-result {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: none;
}

.preview-result.visible {
    display: block;
}

.preview-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

.preview-value {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--success);
    word-break: break-all;
}

/* Solution Display (for filled orders in My Orders) */
.solution-display {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--success-light);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-md);
}

.solution-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--success);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.solution-value {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--success);
    word-break: break-all;
}

/* Calculate Section */
.calculate-section {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
}

.calculate-section h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.calculate-section p {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.calculate-input-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.calculate-input-group input {
    flex: 1;
    min-width: 200px;
}

.calculate-result {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: none;
}

.calculate-result.visible {
    display: block;
}

.calculate-result-item {
    margin-bottom: var(--space-md);
}

.calculate-result-item:last-child {
    margin-bottom: 0;
}

/* Expired Order Section */
.expired-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.expired-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* =============================================================================
   NEW ORDER CARD STYLES
   ============================================================================= */

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
}

.order-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.order-card .order-id {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.order-card .id-label {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-main);
}

.owner-badge {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--primary);
    background: rgba(0, 82, 255, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.order-card .order-pattern {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--space-md);
    letter-spacing: 0.5px;
}

.pattern-prefix {
    color: var(--text-muted);
}

.pattern-value {
    color: var(--primary);
}

.pattern-suffix {
    color: var(--text-muted);
    opacity: 0.5;
}

.order-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.detail-item i {
    opacity: 0.7;
}

.reward-value {
    font-weight: 600;
    color: var(--success);
}

/* Command Section */
.cmd-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.cmd-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.cmd-box {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cmd-box:hover {
    border-color: var(--border-light);
}

.cmd-box code {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-sub);
    word-break: break-all;
    line-height: 1.5;
}

.cmd-copy-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: var(--space-xs);
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.cmd-box:hover .cmd-copy-btn {
    opacity: 1;
}

/* Fulfill Section New */
.fulfill-section {
    margin-top: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.fulfill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-elevated);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-sub);
    transition: all var(--transition-fast);
}

.fulfill-header:hover {
    background: var(--bg-card);
}

.fulfill-header span {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.fulfill-body {
    display: none;
    padding: var(--space-md);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.fulfill-body.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fulfill-body input {
    margin-bottom: var(--space-md);
}

/* Action Section */
.action-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.expired-notice {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    color: var(--warning);
}

/* Solution Section */
.solution-section {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
}

.solution-section .solution-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--success);
    margin-bottom: var(--space-md);
}

.solution-address {
    margin-bottom: var(--space-md);
}

.solution-address .label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.solution-address code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-main);
    word-break: break-all;
}

/* Button Block */
.btn-block {
    display: block;
    width: 100%;
}

/* Button Warning */
.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-warning:hover {
    background: #e09000;
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */

@media (max-width: 480px) {
    .order-item {
        padding: var(--space-md);
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .order-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .order-pattern {
        font-size: var(--text-xl);
    }
    
    .order-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn {
        width: 100%;
    }
}
