/* DME-T Recent Trades Slider */
.recent-trades-container {
    max-width: 100%;
    margin: 30px auto 0;
    background-color: rgba(20, 20, 20, 0.8);
    border-radius: 8px;
    border-left: 4px solid var(--dme-primary);
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.recent-trades-title {
    color: #ffffff; /* Pure white color for title */
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-weight: 600; /* Added font weight for better visibility */
}

/* Removed span styling for all-white title */

.refresh-trades {
    background: none;
    border: none;
    color: var(--dme-primary);
    cursor: pointer;
    padding: 0;
    margin-right: 5px;
}

.trades-slider {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.trades-slider-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.trade-card {
    flex: 0 0 auto;
    width: 280px;
    margin-right: 15px;
    padding: 15px;
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 6px;
    border-left: 3px solid var(--dme-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trade-card.buy-transaction {
    border-left-color: #4CAF50; /* Green for buys */
    border-left-width: 6px;
    background-color: rgba(76, 175, 80, 0.1); /* Light green background */
}

.trade-card.sell-transaction {
    border-left-color: #F44336; /* Red for sells */
    border-left-width: 6px;
    background-color: rgba(244, 67, 54, 0.1); /* Light red background */
}

.trade-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.trade-card:last-child {
    margin-right: 0;
}

.trade-wallet {
    color: var(--dme-primary);
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trade-time {
    color: #888;  /* Gray color as in the screenshot */
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 10px;
}

.trade-amount {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 10px 0;
    display: flex;
    align-items: center;
}

/* Buy and sell icons */
.buy-icon:before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #4CAF50;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.6);
}

.sell-icon:before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #F44336;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 4px rgba(244, 67, 54, 0.6);
}

/* Trade type labels (BUY/SELL) */
.trade-type {
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 10px;
    text-transform: uppercase;
}

.trade-type.buy {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.trade-type.sell {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.data-source {
    color: #888;
    font-size: 0.8rem;
}

.trade-info {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 0.8rem;
    align-items: center;
}

.trade-hash {
    color: #6ABC44;
    text-decoration: none;
    font-family: monospace;
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tx-label, .wallet-label {
    color: #888;
    font-size: 0.8rem;
    margin-right: 3px;
}

.trade-hash:hover {
    text-decoration: underline;
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.slider-arrow {
    background: none;
    border: none;
    color: var(--dme-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.slider-arrow:hover {
    background-color: rgba(106, 188, 68, 0.1);
}

.slider-arrow:disabled {
    color: #444;
    cursor: not-allowed;
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #444;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.slider-dot.active {
    background-color: var(--dme-primary);
}

.loading-trades {
    text-align: center;
    padding: 30px 0;
    color: #888;
}

.trades-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--dme-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

.no-trades-message {
    background-color: rgba(40, 40, 40, 0.6);
    border-radius: 6px;
    padding: 20px;
    margin: 20px;
    text-align: center;
    color: #ccc;
    max-width: 400px;
    margin: 0 auto;
}

.no-trades-message i {
    color: var(--dme-primary);
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.no-trades-note {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

.pending-transaction {
    background-color: rgba(40, 40, 40, 0.7);
    border: 1px dashed #666;
}

.pending-badge {
    display: inline-block;
    background-color: #444;
    color: #aaa;
    font-size: 0.75rem;
    border-radius: 4px;
    padding: 2px 6px;
    margin-top: 4px;
    font-style: italic;
}

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

/* Enhanced slider touch controls */
.trades-slider {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.trade-card.active {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Mobile-specific styling with animations */
@media (max-width: 768px) {
    .trade-card {
        width: 220px;
        transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.3s ease;
    }
    
    .trades-slider-inner {
        transition: transform 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    
    /* Improved slider controls for mobile */
    .slider-controls {
        margin-top: 20px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(139, 197, 63, 0.1);
        border-radius: 50%;
        margin: 0 10px;
    }
    
    .slider-arrow:hover {
        background-color: rgba(139, 197, 63, 0.2);
    }
}

@media (max-width: 576px) {
    /* Force full-width card view on mobile */
    .recent-trades-container {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Clear slider structure */
    .trades-slider {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        position: relative;
        margin: 0 auto;
    }
    
    /* This will create a horizontal row of cards */
    .trades-slider-inner {
        display: flex;
        transition: transform 0.3s ease;
        width: max-content;
    }
    
    /* Each card takes exactly one screen width */
    .trade-card {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        flex: 0 0 100vw !important; 
        margin: 0 !important;
        box-sizing: border-box;
        padding: 15px !important;
        height: auto !important;
        min-height: 160px !important;
    }
    
    /* Special class for the currently visible card */
    .trade-card.mobile-current {
        opacity: 1 !important;
        transform: scale(1) !important;
    }
    
    /* Ensure text fits on mobile */
    .trade-amount {
        font-size: 1.2rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Improve navigation controls */
    .slider-controls button {
        background-color: rgba(139, 197, 63, 0.6) !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Position dots at bottom */
    #slider-dots {
        margin-top: 5px;
    }
}
    
    /* Mobile optimized card styling */
    .trade-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        text-align: center !important;
        border-width: 0 !important;
        border-radius: 10px !important;
        border-top: 5px solid var(--dme-primary) !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
        background-color: rgba(30, 30, 30, 0.9) !important;
    }
    
    /* Improved text handling for large numbers */
    .trade-card .trade-amount {
        font-size: 1.15rem !important;
        margin: 8px 0 !important;
        word-break: break-word !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        padding: 0 5px !important;
    }
    
    /* Smaller wallet address font to prevent overflow */
    .trade-card .trade-wallet {
        font-size: 0.8rem !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Make sure transaction hash is also properly sized */
    .trade-card .trade-hash {
        max-width: 100px !important;
    }
    
    /* Buy/Sell specific styling */
    .trade-card.buy-transaction {
        border-top-color: #4CAF50 !important;
        background: linear-gradient(to bottom, rgba(76, 175, 80, 0.1), rgba(30, 30, 30, 0.9) 30%) !important;
    }
    
    .trade-card.sell-transaction {
        border-top-color: #F44336 !important;
        background: linear-gradient(to bottom, rgba(244, 67, 54, 0.1), rgba(30, 30, 30, 0.9) 30%) !important;
    }
    
    /* Bigger, more visible mobile navigation buttons */
    .slider-controls {
        display: flex;
        justify-content: center;
        margin-top: 20px;
    }
    
    .slider-arrow {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background-color: rgba(139, 197, 63, 0.15);
        color: var(--dme-primary);
        margin: 0 15px;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    .slider-arrow:hover, .slider-arrow:active {
        background-color: rgba(139, 197, 63, 0.3);
        transform: scale(1.05);
    }
    
    /* Clear dots styling to avoid duplication */
    .slider-dots {
        display: flex;
        justify-content: center;
        margin-top: 15px;
    }
}

/* No trades message styling */
.no-trades-message {
    text-align: center;
    padding: 40px 20px;
    color: #e0e0e0;
    background-color: rgba(25, 25, 25, 0.95);
    border-radius: 10px;
    border: 1px solid rgba(139, 197, 63, 0.3);
    max-width: 400px;
    margin: 0 auto;
}

.no-trades-message i {
    font-size: 3rem;
    color: var(--dme-primary);
    margin-bottom: 15px;
    display: block;
}

.no-trades-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--dme-primary);
    margin-bottom: 15px;
}

.no-trades-note {
    font-size: 1rem;
    color: #b0b0b0;
    margin-bottom: 12px;
    line-height: 1.4;
}

.no-trades-check {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    border-top: 1px solid rgba(139, 197, 63, 0.2);
    padding-top: 12px;
    margin-top: 12px;
}

/* Mobile specific styling for no trades */
@media (max-width: 575px) {
    .no-trades-message {
        padding: 30px 15px;
        margin: 10px;
    }
    
    .no-trades-message i {
        font-size: 2.5rem;
    }
    
    .no-trades-title {
        font-size: 1.2rem;
    }
    
    .no-trades-note {
        font-size: 0.9rem;
    }
}

/* Remove duplicate dot styles if they exist */
