/* ── Firm Table View ── */

.firm-table-wrap {
    margin-top: 1.5rem;
}

.firm-table-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.firm-table-stats__sep {
    opacity: 0.4;
}

.firm-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

/* Table */
.firm-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}

/* Header */
.firm-table__th {
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    transition: color 0.15s ease;
    text-align: left;
}

.firm-table__th:hover {
    color: rgba(255, 255, 255, 0.85);
}

.firm-table__th i {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0.5;
}

.firm-table__th:hover i {
    opacity: 1;
}

.firm-table__th--action {
    text-align: center;
    width: 80px;
}

/* Rows */
.firm-table__row {
    transition: background 0.15s ease;
}

.firm-table__row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.firm-table__row:not(:last-child) .firm-table__td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cells */
.firm-table__td {
    padding: 12px 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    vertical-align: middle;
    white-space: nowrap;
}

/* Firm name cell */
.firm-table__td--name {
    min-width: 200px;
}

.firm-table__firm-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.firm-table__firm-link:hover {
    color: #7A95F8;
    text-decoration: none;
}

.firm-table__logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}

/* Type badge */
.firm-table__type-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(122, 149, 248, 0.15);
    color: #a4b8ff;
    letter-spacing: 0.3px;
}

/* Price */
.firm-table__td--price {
    white-space: nowrap;
}

.firm-table__price {
    font-weight: 700;
    color: #fff;
    font-size: 15px;
}

.firm-table__price-note {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin-top: 1px;
}

/* Profit split */
.firm-table__split {
    font-weight: 600;
}

.firm-table__split--high {
    color: #34d399;
}

/* TrustPilot */
.firm-table__tp {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.firm-table__tp-star {
    color: #00b67a;
    font-size: 15px;
}

/* PFM Score */
.firm-table__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.firm-table__score--high {
    background: rgba(99, 102, 241, 0.2);
    color: #a4b8ff;
}

/* N/A placeholder */
.firm-table__na {
    color: rgba(255, 255, 255, 0.2);
    font-size: 14px;
}

/* Deal/promo */
.firm-table__promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.firm-table__promo-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: scale(1.03);
}

.firm-table__promo-btn i {
    font-size: 12px;
}

.firm-table__deal-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Action buttons */
.firm-table__td--action {
    text-align: center;
}

.firm-table__action-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.firm-table__get-started-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.firm-table__get-started-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.firm-table__details-link {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.firm-table__details-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.firm-table__view-btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    background: linear-gradient(135deg, #7a95f8, #6366f1);
    color: #fff;
    text-decoration: none;
    transition: all 0.15s ease;
}

.firm-table__view-btn:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Sticky first column */
.firm-table__th--sticky,
.firm-table__td--sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: rgba(30, 20, 60, 0.95);
}

.firm-table__th--sticky {
    background: rgba(30, 20, 60, 0.98);
    z-index: 3;
}

.firm-table__row:hover .firm-table__td--sticky {
    background: rgba(40, 30, 70, 0.98);
}

/* View toggle buttons */
.firm-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.firm-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 18px;
}

.firm-view-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.firm-view-btn--active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.firm-view-btn--active:hover {
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .firm-table-scroll {
        margin: 0 -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .firm-table__th,
    .firm-table__td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .firm-table__logo {
        width: 28px;
        height: 28px;
    }

    .firm-table__firm-link {
        gap: 8px;
        font-size: 13px;
    }

    .firm-table__price {
        font-size: 14px;
    }

    .firm-view-toggle {
        margin-top: 8px;
    }
}

@media (max-width: 576px) {
    .firm-table__td--sticky,
    .firm-table__th--sticky {
        min-width: 160px;
    }

    .firm-table-stats {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .firm-table-stats__sep {
        display: none;
    }
}
