/* ===== MOBILE STYLES FOR TRADER TABLES ===== */

/* Disable animations when keyboard is likely open */
@media (max-width: 768px) {
  input:focus ~ * .tx-table-container,
  input:focus ~ * .trades-container,
  input:focus ~ * .holdings-container,
  .wallet-input:focus ~ * .tx-table-container,
  .wallet-input:focus ~ * .trades-container,
  .wallet-input:focus ~ * .holdings-container {
    animation: none !important;
  }
  
  /* Prevent layout shifts when keyboard opens */
  .wallet-input:focus {
    position: relative;
  }
}

  /* Transaction Table Mobile Styles */
@media (max-width: 768px) {
  /* Analytics dashboard container fix */
  .analytics-dashboard {
    padding: 1rem;
    overflow: visible;
  }
  
  /* Remove animations on mobile to prevent keyboard issues */
  .tx-table-container,
  .trades-container,
  .holdings-container,
  .wallet-info-container {
    animation: none !important;
  }
  
  /* Full width container on mobile */
  .tx-table-container {
    margin-left: 0;
    margin-right: 0;
    border-radius: var(--radius-lg);
    overflow: visible;
  }
  

  
  .tx-table-container .table-header {
    padding: 1rem;
    overflow: visible;
    min-height: auto;
  }
  
  .tx-table-container .table-title {
    font-size: 1rem;
    line-height: 1.4;
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: none;
    padding-right: 0.5rem;
    margin: 0;
  }
  
  .tx-table-container .table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0 1rem 0.5rem 0;
  }
  

  
  /* Simple scrollable table for mobile */
  .transaction-table {
    width: 100%;
    min-width: 570px; /* Verminderd omdat Price kolom weg is */
    font-size: 0.8125rem;
    border-collapse: collapse;
    table-layout: fixed;
  }
  
  .transaction-table thead th,
  .transaction-table tbody td {
    padding: 0.75rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--neutral-200);
  }
  
  /* Time column - ensure visible */
  .transaction-table thead th:first-child,
  .transaction-table tbody td:first-child {
    width: 100px;
    min-width: 100px;
    padding-left: 1rem;
    padding-right: 0.5rem;
    text-align: left;
    position: relative;
  }
  
  /* Token column - meer ruimte voor overlay probleem */
  .transaction-table thead th:nth-child(2),
  .transaction-table tbody td:nth-child(2) {
    min-width: 150px;
    width: 150px;
  }
  
  /* Type column - kleiner voor meer token ruimte */
  .transaction-table thead th:nth-child(3),
  .transaction-table tbody td:nth-child(3) {
    min-width: 50px;
    width: 50px;
    text-align: center;
  }
  
  /* Value column - nu 4e kolom na Type */
  .transaction-table thead th:nth-child(4),
  .transaction-table tbody td:nth-child(4) {
    min-width: 90px;
    text-align: right;
  }
  
  /* Amount column - nu 5e kolom na Value */
  .transaction-table thead th:nth-child(5),
  .transaction-table tbody td:nth-child(5) {
    min-width: 90px;
    text-align: right;
  }
  

  
  /* Token cell adjustments */
  .transaction-table .token-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Meer ruimte tussen icon en tekst */
    cursor: pointer;
    padding-right: 0.5rem; /* Extra padding voor ruimte */
  }
  
  .transaction-table .token-img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
  
  .transaction-table .token-symbol {
    font-size: 0.8125rem;
    font-weight: 600;
  }
  
  .transaction-table .token-name {
    display: none;
  }
  
  /* Simple headers */
  .transaction-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    background: var(--neutral-50);
  }
  

  
  /* Time formatting */
  .transaction-table .time-cell {
    font-size: 0.65rem;
    color: var(--neutral-600);
  }
  
  /* Type badges */
  .transaction-table .type-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* Price column - verbergen op mobiel */
  .transaction-table thead th:nth-child(6),
  .transaction-table tbody td:nth-child(6) {
    display: none;
  }
  
  .transaction-table thead th:nth-child(7),
  .transaction-table tbody td:nth-child(7) {
    min-width: 70px;
  }
  
  /* Sortable indicators smaller */
  .transaction-table .sort-indicator {
    font-size: 0.5rem;
    margin-left: 0.25rem;
  }
}

/* Extra small screens - show only essential data */
@media (max-width: 480px) {
  .transaction-table thead th,
  .transaction-table tbody td {
    padding: 0.625rem 0.5rem;
    font-size: 0.75rem;
  }
  

  

  

}

/* Trades Table Mobile Styles */
@media (max-width: 768px) {
  .trades-container {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow: visible;
  }
  
  .trades-container .table-header {
    padding: 1rem;
  }
  
  .trades-container .table-title {
    font-size: 1.125rem;
  }
  
  .trades-container .table-subtitle {
    font-size: 0.75rem;
  }
  
  .trades-container .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    padding-bottom: 0.5rem;
  }
  
  /* Make table scrollable with all columns */
  .trades-table {
    width: 100%;
    min-width: 700px;
    table-layout: auto;
  }
  
  .trades-table thead th,
  .trades-table tbody td {
    padding: 0.625rem 0.5rem;
    font-size: 0.8125rem;
  }
  
  /* Token column - optimized for max 10 char symbols */
  .trades-table thead th:first-child,
  .trades-table tbody td:first-child {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    padding-left: 1rem;
  }
  
  /* Net Profit column */
  .trades-table thead th:nth-child(2),
  .trades-table tbody td:nth-child(2) {
    width: 110px;
    text-align: right;
    padding-left: 0.5rem;
  }
  
  /* PnL % column */
  .trades-table thead th:nth-child(3),
  .trades-table tbody td:nth-child(3) {
    width: 85px;
    text-align: right;
  }
  
  /* Holding Value column */
  .trades-table thead th:nth-child(4),
  .trades-table tbody td:nth-child(4) {
    width: 100px;
    text-align: right;
  }
  
  /* Bought column */
  .trades-table thead th:nth-child(5),
  .trades-table tbody td:nth-child(5) {
    width: 90px;
    text-align: right;
  }
  
  /* Sold column */
  .trades-table thead th:nth-child(6),
  .trades-table tbody td:nth-child(6) {
    width: 90px;
    text-align: right;
  }
  
  .trades-table .token-cell {
    min-width: auto;
    gap: 0.5rem;
    display: flex;
    align-items: center;
  }
  
  .trades-table .token-img {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
  }
  
  .trades-table .token-symbol {
    font-size: 0.8125rem;
    font-weight: 600;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .trades-table .token-name {
    display: none;
  }
  
  /* Compact header text for mobile */
  .trades-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
  }
}

/* Holdings Table Mobile Styles */
@media (max-width: 768px) {
  .holdings-container {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow: visible;
  }
  
  .holdings-container .table-header {
    padding: 1rem;
  }
  
  .holdings-container .table-title {
    font-size: 1.125rem;
  }
  
  .holdings-container .table-subtitle {
    font-size: 0.75rem;
  }
  
  .holdings-container .table-wrapper {
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
  }
  
  /* Fit table to mobile */
  .holdings-table {
    width: 100%;
    table-layout: fixed;
  }
  
  .holdings-table thead th,
  .holdings-table tbody td {
    padding: 0.5rem 0.375rem;
    font-size: 0.75rem;
  }
  
  /* Column widths */
  .holdings-table thead th:first-child,
  .holdings-table tbody td:first-child {
    width: 50%; /* Token */
  }
  
  .holdings-table thead th:nth-child(2),
  .holdings-table tbody td:nth-child(2) {
    width: 25%; /* Value */
  }
  
  .holdings-table thead th:nth-child(3),
  .holdings-table tbody td:nth-child(3) {
    width: 25%; /* Amount */
  }
  
  .holdings-table .token-cell {
    min-width: auto;
    gap: 0.375rem;
  }
  
  .holdings-table .token-img {
    width: 24px;
    height: 24px;
  }
  
  .holdings-table .token-symbol {
    font-size: 0.75rem;
    font-weight: 600;
  }
  
  .holdings-table .token-name {
    display: none;
  }
  
  /* Compact headers */
  .holdings-table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
  }
}

/* Wallet Search Mobile Styles */
@media (max-width: 768px) {
  .wallet-search-container {
    margin: 1.5rem 0 2rem;
    padding: 0 1rem;
  }
  
  .search-input-wrapper {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .wallet-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
  }
  
  .wallet-search-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
  }
  
  .wallet-search-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Small Mobile Styles (480px and below) */
@media (max-width: 480px) {
  /* Even more compact search on very small screens */
  .wallet-search-container {
    margin: 1rem 0 1.5rem;
    padding: 0 0.75rem;
  }
  
  .wallet-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }
  
  .wallet-search-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
  
  /* Headers */
  .table-header {
    padding: 1rem !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    overflow: visible !important;
  }
  
  .table-title {
    font-size: 0.9375rem !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  
  .table-subtitle {
    font-size: 0.7rem !important;
  }
  
  .table-controls {
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  /* Transaction Table - keep simple */
  .transaction-table {
    min-width: 480px; /* Verder verminderd voor kleine schermen */
  }
  
  /* Override column widths for smaller screens */
  .transaction-table thead th:first-child,
  .transaction-table tbody td:first-child {
    width: 90px;
    min-width: 90px;
  }
  
  /* Trades Table - show all columns */
  .trades-table {
    min-width: 650px;
  }
  
  /* Keep token column compact */
  .trades-table thead th:first-child,
  .trades-table tbody td:first-child {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
  }
  
  .trades-table thead th,
  .trades-table tbody td {
    padding: 0.5rem;
    font-size: 0.8125rem;
  }
  
  .trades-table thead th {
    font-size: 0.75rem;
  }
  
  .trades-table .token-img {
    width: 24px;
    height: 24px;
  }
  
  /* Holdings Table */
  .holdings-table {
    min-width: 400px;
  }
  
  .holdings-table thead th,
  .holdings-table tbody td {
    padding: 0.5rem;
    font-size: 0.8125rem;
  }
  
  .holdings-table thead th {
    font-size: 0.75rem;
  }
  
  .holdings-table .token-img {
    width: 24px;
    height: 24px;
  }
  

  
  /* Adjust numeric cells */
  .numeric-cell {
    font-size: 0.8125rem !important;
  }
}



/* Featured Traders Container Mobile Fix */
@media (max-width: 768px) {
  .best-traders-slider-container {
    margin-left: 0rem !important;
    margin-right: 0rem !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    overflow: visible !important;
  }
}

/* Scrollbar styling for mobile tables */
@media (max-width: 768px) {
  .table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
  }
  
  .table-wrapper::-webkit-scrollbar {
    height: 6px;
  }
  
  .table-wrapper::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .table-wrapper::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
  }
  
  .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
  }
}

/* Wallet Info Container Mobile */
@media (max-width: 768px) {
  .wallet-info-container {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .wallet-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .wallet-address {
    font-size: 1rem;
    word-break: break-all;
  }
  
  .wallet-username {
    font-size: 0.875rem;
  }
  
  .wallet-stats-section {
    padding: 1rem;
  }
  
  .wallet-stats-header {
    margin-bottom: 1rem;
  }
  
  .wallet-stats-title {
    font-size: 1rem;
  }
  
  .wallet-stats-period {
    font-size: 0.75rem;
  }
  
  .wallet-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .wallet-stat-card {
    padding: 0.875rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .stat-value {
    font-size: 1.125rem;
  }
  
  .stat-icon {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .wallet-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .wallet-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .stat-icon {
    order: -1;
  }
}