.xtrade-stocks-table-wrapper {
  overflow-x: auto;
  width: 100%;
  min-width: 320px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 0;
}
.xtrade-stocks-list {
  min-width: 340px;
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  overflow-y: hidden;
}

.xtrade-header-row,
.xtrade-stock-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 320px;
  box-sizing: border-box;
}

/* Column definitions - giữ Symbol và Mini Chart luôn hiển thị */
.xtrade-col-symbol      { flex: 2 1 0; min-width: 120px; text-align: left; }
.xtrade-col-chart       { flex: 2 1 0; min-width: 80px; }
.xtrade-col-price,
.xtrade-col-chg,
.xtrade-col-chg-percent,
.xtrade-col-watchlist,
.xtrade-col-trade { flex: 0 0 0; min-width: 0; display: none; }
@media (min-width: 901px) {
  .xtrade-col-price,
  .xtrade-col-chg,
  .xtrade-col-chg-percent,
  .xtrade-col-watchlist,
  .xtrade-col-trade {
    display: flex;
    min-width: 80px;
    flex: 1 1 0;
  }
  .xtrade-col-symbol { min-width: 150px; }
  .xtrade-col-chart { min-width: 120px; }
}
@media (max-width: 900px) {
  .xtrade-stocks-table-wrapper {
    max-width: 60vw;
    min-width: 260px;
  }
  .xtrade-col-symbol { min-width: 100px; }
  .xtrade-col-chart { min-width: 60px; }
}
@media (max-width: 600px) {
  .xtrade-header-row { display: none; }
  .xtrade-stock-row {
    flex-wrap: nowrap;
    padding: 10px 0 10px 0;
    min-width: 220px;
  }
  .xtrade-col-symbol, .xtrade-col-chart {
    flex-basis: auto !important;
    min-width: 80px;
    margin-bottom: 0;
  }
}

/*xtrade stocks*/
.xtrade-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: transparent;
    color: #000000; 
    width: 100%;
    max-width: 1200px; 
    margin: 20px auto;
}
.xtrade-stocks-list {
    width: 100%;
    border-collapse: collapse;
}

.xtrade-header-row,
.xtrade-stock-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 10px;
    box-sizing: border-box;
}

.xtrade-header-row {
    background-color: #F5F6F9 !important; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #000000;
    font-size: 13px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.xtrade-stock-row {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 16px;
    transition: background-color 0.2s ease-in-out;
}
.xtrade-stock-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.xtrade-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
}
/* Column definitions for full view */
.xtrade-col-symbol      { flex: 2 1 0; min-width: 150px; text-align: left; }
.xtrade-col-chart       { flex: 2 1 0; min-width: 150px; }
.xtrade-col-price       { flex: 1.5 1 0; min-width: 100px; text-align: right; }
.xtrade-col-chg         { flex: 1.5 1 0; min-width: 100px; text-align: right; }
.xtrade-col-chg-percent { flex: 1.5 1 0; min-width: 100px; text-align: right; }
.xtrade-col-watchlist   { flex: 1 1 0; min-width: 80px; align-items: center; }
.xtrade-col-trade       { flex: 1 1 0; min-width: 80px; align-items: center; }

.xtrade-symbol-ticker {
    font-weight: 400;
    font-size: 18px;
    color: #000000;
}.xtrade-symbol-name {
    font-size: 13px;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px; 
    font-weight: 300;
}

.xtrade-chart-container {
    height: 45px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xtrade-mini-chart {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

.xtrade-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    color: #999;
    font-size: 11px;
    font-style: italic;
}

.xtrade-stock-row.positive .xtrade-col-price,
.xtrade-stock-row.positive .xtrade-col-chg,
.xtrade-stock-row.positive .xtrade-col-chg-percent {
    color: #26a69a; 
}
.xtrade-stock-row.negative .xtrade-col-price,
.xtrade-stock-row.negative .xtrade-col-chg,
.xtrade-stock-row.negative .xtrade-col-chg-percent {
    color: #ef5350; 
}
.xtrade-stock-row.neutral .xtrade-col-price,
.xtrade-stock-row.neutral .xtrade-col-chg,
.xtrade-stock-row.neutral .xtrade-col-chg-percent {
    color: #000000; 
}

.xtrade-icon {
    cursor: pointer;
    color: #000000;
    transition: color 0.2s ease-in-out;
}.xtrade-icon:hover {
    color: #ffffff;
}.xtrade-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.xtrade-load-more-container {
    text-align: center;
    margin-top: 30px;
    background: #fff;
    z-index: 10;
    width: 100%;
}.xtrade-load-more-btn {
    background: #6E00D6 !important; 
    color: white;
    border: none !important;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}.xtrade-load-more-btn:hover:not(:disabled) {
    background: #6E00D6 !important;
}.xtrade-load-more-btn:disabled {
    background: #6E00D6 !important;
    cursor: not-allowed;
}

/* Skeleton Loading Styles */
.xtrade-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: xtrade-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes xtrade-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.xtrade-skeleton-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 10px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.xtrade-skeleton-symbol {
    flex: 2 1 0;
    min-width: 150px;
    padding: 0 10px;
}

.xtrade-skeleton-symbol-ticker {
    height: 18px;
    width: 60px;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: xtrade-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.xtrade-skeleton-symbol-name {
    height: 13px;
    width: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: xtrade-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.xtrade-skeleton-chart {
    flex: 2 1 0;
    min-width: 150px;
    padding: 0 10px;
    height: 45px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: xtrade-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.xtrade-skeleton-text {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: xtrade-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.xtrade-skeleton-price { flex: 1.5 1 0; min-width: 100px; padding: 0 10px; }
.xtrade-skeleton-chg { flex: 1.5 1 0; min-width: 100px; padding: 0 10px; }
.xtrade-skeleton-chg-percent { flex: 1.5 1 0; min-width: 100px; padding: 0 10px; }
.xtrade-skeleton-watchlist { flex: 1 1 0; min-width: 80px; padding: 0 10px; }
.xtrade-skeleton-trade { flex: 1 1 0; min-width: 80px; padding: 0 10px; }

.xtrade-skeleton-price .xtrade-skeleton-text { width: 60px; }
.xtrade-skeleton-chg .xtrade-skeleton-text { width: 50px; }
.xtrade-skeleton-chg-percent .xtrade-skeleton-text { width: 55px; }
.xtrade-skeleton-watchlist .xtrade-skeleton-text { width: 24px; height: 24px; border-radius: 50%; }
.xtrade-skeleton-trade .xtrade-skeleton-text { width: 24px; height: 24px; border-radius: 50%; }

/* Loading state */
.xtrade-loading-state {
    opacity: 0.7;
    pointer-events: none;
}

.xtrade-loading-overlay {
    position: relative;
}

.xtrade-loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.xtrade-error-inline {
    color: #fca5a5;
    text-align: center;
    padding: 20px;
    font-weight: 300;
}.xtrade-loading {
    color: #e5e7eb;
}

@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.xtrade-stock-row.new-item {
    animation: fadeInRow 0.5s ease-out forwards;
}

/* Skeleton Loading Styles */
.xtrade-skeleton-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 10px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.xtrade-skeleton-symbol {
    flex: 2 1 0;
    min-width: 150px;
    padding: 0 10px;
}

.xtrade-skeleton-symbol-ticker,
.xtrade-skeleton-symbol-name {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    margin-bottom: 4px;
}

.xtrade-skeleton-symbol-ticker {
    height: 18px;
    width: 80%;
}

.xtrade-skeleton-symbol-name {
    height: 13px;
    width: 60%;
}

.xtrade-skeleton-chart {
    flex: 2 1 0;
    min-width: 150px;
    padding: 0 10px;
    height: 45px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
}

.xtrade-skeleton-price,
.xtrade-skeleton-chg,
.xtrade-skeleton-chg-percent,
.xtrade-skeleton-watchlist,
.xtrade-skeleton-trade {
    flex: 1.5 1 0;
    min-width: 100px;
    padding: 0 10px;
    display: flex;
    justify-content: flex-end;
}

.xtrade-skeleton-watchlist,
.xtrade-skeleton-trade {
    flex: 1 1 0;
    min-width: 80px;
    justify-content: center;
}

.xtrade-skeleton-text {
    height: 16px;
    width: 70%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Dark mode skeleton */
@media (prefers-color-scheme: dark) {
    .xtrade-skeleton-symbol-ticker,
    .xtrade-skeleton-symbol-name,
    .xtrade-skeleton-chart,
    .xtrade-skeleton-text {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
    }
}

