/* Enhanced Challenges Table Styles
 * Based on trading-challenges-block but adapted for prop-firms-display
 * Only includes table styles without filters and popup
 */

/* Table Wrapper */
.pfd-enhanced-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

/* Scroll indicator shadow for mobile */
.pfd-enhanced-table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 1024px) {
    .pfd-enhanced-table-wrapper::after {
        opacity: 1;
    }
    
    .pfd-enhanced-table-wrapper.scrolled-to-end::after {
        opacity: 0;
    }
}

/* Table Container - Using display: table for better structure */
.pfd-enhanced-table-container {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Table Header */
.pfd-enhanced-table-header {
    display: table-row;
    background: var(--pfd-bg-secondary);
}

.pfd-enhanced-table-header > div {
    display: table-cell;
    padding: 16px 8px;
    font-size: 13px;
    color: var(--pfd-text-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--pfd-border-light);
    text-align: center;
    vertical-align: middle;
    line-height: 1.4;
    background: var(--pfd-bg-secondary);
}

/* Column Widths */
.pfd-ecol-price { width: 100px; }
.pfd-ecol-size { width: 90px; }
.pfd-ecol-steps { width: 90px; }
.pfd-ecol-target { width: 100px; }
.pfd-ecol-split { width: 120px; }
.pfd-ecol-loss { width: 140px; white-space: nowrap; }
.pfd-ecol-actions { 
    width: 120px;
    position: sticky;
    right: 0;
    z-index: 20;
    background: #fff;
    box-shadow: none;
}

.pfd-enhanced-table-header .pfd-ecol-actions {
    background: #fff;
    z-index: 30;
    box-shadow: none;
}

.pfd-enhanced-challenge-row .pfd-ecol-actions {
    box-shadow: none;
}

/* Table Body */
.pfd-enhanced-challenges-table {
    display: table-row-group;
}

/* Challenge Row */
.pfd-enhanced-challenge-row {
    display: table-row;
    transition: background 0.2s;
}

.pfd-enhanced-challenge-row:hover > * {
    background: #fafafa;
}

.pfd-enhanced-challenge-row > div {
    display: table-cell;
    padding: 15px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    text-align: center;
}

/* Price Column */
.pfd-eprice-value {
    font-size: 17px;
    color: #318740;
    margin-bottom: 2px;
    font-weight: 600;
}

.pfd-eold-price {
    font-size: 11px;
    color: #323233;
    text-decoration: line-through;
}

/* Info Values */
.pfd-einfo-value {
    font-size: 14px;
    color: #000;
}

/* Profit Split Column */
.pfd-eprofit-split-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pfd-eprofit-bar-container {
    width: 100%;
    height: 3px;
    background: #e8e8e8;
    border-radius: 1.5px;
    overflow: hidden;
}

.pfd-eprofit-bar {
    height: 3px;
    background: #F4B63E;
    border-radius: 1.5px;
    transition: width 0.3s;
}

/* Button Styles */
.pfd-ebtn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 120px; /* 3x ширина от стандартной ~40px */
}

.pfd-ebtn-primary {
    background: #F4B63E;
    color: #000;
    font-weight: 600;
}

.pfd-ebtn-primary:hover {
    background: #e5a830;
    color: #000;
}

.pfd-ebtn-disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.pfd-ebtn-disabled:hover {
    background: #e0e0e0;
    color: #999;
    transform: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Enable horizontal scroll on tablets and mobile */
    .pfd-enhanced-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pfd-enhanced-table-container {
        min-width: 680px; /* Reduced from 800px after removing leverage column */
    }
}

@media (max-width: 768px) {
    .pfd-enhanced-table-wrapper {
        border-radius: 8px;
        margin-top: 15px;
    }
    
    .pfd-enhanced-table-container {
        min-width: 640px; /* Reduced from 750px */
    }
    
    .pfd-enhanced-table-header > div,
    .pfd-enhanced-challenge-row > div {
        padding: 12px 6px;
        font-size: 12px;
    }
    
    .pfd-eprice-value {
        font-size: 15px;
    }
    
    .pfd-einfo-value {
        font-size: 12px;
    }
    
    .pfd-ebtn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 80px; /* 2x для мобильных */
    }
    
    /* Maintain column widths for horizontal scroll */
    .pfd-ecol-price { min-width: 85px; }
    .pfd-ecol-size { min-width: 75px; }
    .pfd-ecol-steps { min-width: 75px; }
    .pfd-ecol-target { min-width: 85px; }
    .pfd-ecol-split { min-width: 110px; }
    .pfd-ecol-loss { min-width: 130px; }
    .pfd-ecol-actions { min-width: 95px; }
}

@media (max-width: 480px) {
    .pfd-enhanced-table-container {
        min-width: 600px; /* Reduced from 700px */
    }
    
    .pfd-enhanced-table-header > div {
        padding: 10px 5px;
        font-size: 11px;
    }
    
    .pfd-enhanced-challenge-row > div {
        padding: 12px 5px;
    }
    
    .pfd-eprice-value {
        font-size: 14px;
    }
    
    .pfd-einfo-value {
        font-size: 11px;
    }
    
    .pfd-ebtn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Compact column widths for mobile */
    .pfd-ecol-price { min-width: 80px; }
    .pfd-ecol-size { min-width: 70px; }
    .pfd-ecol-steps { min-width: 70px; }
    .pfd-ecol-target { min-width: 80px; }
    .pfd-ecol-split { min-width: 100px; }
    .pfd-ecol-loss { min-width: 120px; }
    .pfd-ecol-actions { min-width: 85px; }
}
