/* Prop Firm Allocation Table - Frontend Styles */

.pfat-table-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Filter Bar */
.pfat-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.pfat-filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.pfat-filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.pfat-filter-tab:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.pfat-filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pfat-tab-icon {
    font-size: 18px;
}

.pfat-tab-text {
    font-weight: 600;
}

.pfat-tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.pfat-filter-tab.active .pfat-tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Sort Dropdown */
.pfat-sort-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pfat-sort-dropdown label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.pfat-sort-select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.pfat-sort-select:hover,
.pfat-sort-select:focus {
    border-color: #667eea;
    outline: none;
}

/* Table Container */
.pfat-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pfat-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.pfat-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pfat-table thead th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pfat-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.pfat-table tbody tr:hover {
    background: #f9f9ff;
}

.pfat-table tbody td {
    padding: 16px;
    vertical-align: middle;
}

.pfat-featured-row {
    background: #fffbf0;
    border-left: 4px solid #fbbf24;
}

.pfat-featured-row:hover {
    background: #fff9e6;
}

/* Rank Column */
.pfat-col-rank {
    width: 80px;
    text-align: center;
}

.pfat-rank-badge {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pfat-rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    font-size: 18px;
}

.pfat-rank-2 {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.pfat-rank-3 {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

/* Firm Column */
.pfat-col-firm {
    min-width: 250px;
}

.pfat-firm-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pfat-firm-logo {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.pfat-firm-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pfat-no-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
}

.pfat-firm-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfat-firm-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.pfat-promo-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #dcfce7;
    color: #166534;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.pfat-featured-badge {
    display: inline-block;
    padding: 3px 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Category Column */
.pfat-col-category {
    min-width: 150px;
}

.pfat-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pfat-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.pfat-category-cfd {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.pfat-category-futures {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.pfat-category-none {
    color: #9ca3af;
}

/* Allocation Column */
.pfat-col-allocation {
    min-width: 180px;
}

.pfat-allocation-value {
    display: flex;
    align-items: center;
}

.pfat-amount {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Accounts Column */
.pfat-col-accounts {
    min-width: 150px;
}

.pfat-accounts-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfat-account-number {
    font-size: 22px;
    font-weight: 700;
    color: #667eea;
}

.pfat-account-types {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

/* Actions Column */
.pfat-col-actions {
    min-width: 180px;
}

.pfat-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pfat-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.pfat-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pfat-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pfat-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.pfat-btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Table Footer */
.pfat-table-footer {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
}

.pfat-disclaimer {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.pfat-affiliate-disclosure {
    display: block;
    margin-top: 5px;
    font-style: italic;
    color: #9ca3af;
}

/* No Results */
.pfat-no-results {
    padding: 40px;
    text-align: center;
    color: #6b7280;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pfat-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pfat-filter-tabs {
        flex-direction: column;
    }
    
    .pfat-filter-tab {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .pfat-table {
        min-width: auto;
    }
    
    .pfat-table thead {
        display: none;
    }
    
    .pfat-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 15px;
    }
    
    .pfat-table tbody td {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .pfat-table tbody td:last-child {
        border-bottom: none;
    }
    
    .pfat-table tbody td:before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #6b7280;
        margin-bottom: 5px;
        font-size: 12px;
        text-transform: uppercase;
    }
    
    .pfat-col-rank,
    .pfat-col-firm,
    .pfat-col-category,
    .pfat-col-allocation,
    .pfat-col-accounts,
    .pfat-col-actions {
        width: 100%;
        min-width: auto;
    }
    
    .pfat-action-buttons {
        flex-direction: column;
    }
    
    .pfat-btn {
        width: 100%;
    }
}

/* Loading State */
.pfat-table-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pfat-table-container.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #667eea;
}
