/* Influential people — flat, edge-to-edge UI + expand-to-grow table */

/* Override commodities.css .table-container { max-height: 800px; overflow-y: auto } */
.ip-page .table-container,
.ip-page .table-container.glass-data-card {
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Flat shells: no glass, shadow, or soft radius */
.ip-page .ip-intro,
.ip-page .ip-filters-card,
.ip-page .ip-person-hero,
.ip-page .glass-data-card.table-container,
.ip-page .table-container.glass-data-card {
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
}

.ip-page .ip-intro {
    border: 1px solid var(--border-light, #e5e7eb);
    border-left: none;
    border-right: none;
    margin-bottom: 0;
    padding: 14px 16px;
}

.ip-page .ip-filters-card {
    border: 1px solid var(--border-light, #e5e7eb);
    border-left: none;
    border-right: none;
    margin-bottom: 0;
    padding: 16px;
    background: #fff;
}

.ip-page .ip-person-hero {
    border: 1px solid var(--border-light, #e5e7eb);
    border-left: none;
    border-right: none;
    margin-bottom: 0;
    padding: 16px;
    background: #fff;
}

.ip-page .glass-data-card.table-container,
.ip-page .table-container.glass-data-card {
    border: 1px solid var(--border-light, #e5e7eb);
    border-left: none;
    border-right: none;
    margin-bottom: 0;
    background: #fff;
}

.ip-page .finance-detail-content {
    padding-left: 0;
    padding-right: 0;
}

.ip-page .finance-detail-header-inner {
    padding-left: 16px;
    padding-right: 16px;
}

.ip-page .finance-sidebar-col {
    padding-left: 16px;
    padding-right: 16px;
}

.ip-page .ip-back-link {
    display: inline-block;
    margin: 0 16px 12px;
}

/* Keep search icon inside the field (never a flex sibling) */
.ip-page .ip-search-wrap {
    display: block;
    position: relative;
}

.ip-page .ip-search-wrap .ip-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    pointer-events: none;
    z-index: 1;
}

/* Flatten filter controls */
.ip-page .search-input,
.ip-page .stock-select {
    border-radius: 4px;
    box-shadow: none;
}

@media (max-width: 720px) {
    .ip-page .ip-filters-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
    }

    .ip-page .ip-search-wrap {
        flex: 1 1 100%;
    }

    .ip-page .ip-stock-field {
        flex: 1 1 140px;
        min-width: 0;
    }

    .ip-page .filter-info {
        margin-left: 0;
        align-self: flex-end;
    }
}

.ip-page .search-input:focus,
.ip-page .stock-select:focus {
    box-shadow: none;
    border-color: #6366f1;
}

.ip-page .filter-info {
    border-radius: 4px;
    box-shadow: none;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.ip-page .ip-person-chip {
    border-radius: 4px;
    box-shadow: none;
}

.ip-page .ip-person-chip.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
    box-shadow: none;
}

.ip-page .ip-person-chip.active:hover {
    background: #4338ca;
    border-color: #4338ca;
    box-shadow: none;
}

.ip-page .ip-person-scroll::before,
.ip-page .ip-person-scroll::after {
    display: none;
}

.ip-page .details-proof {
    border-radius: 4px;
    background: #f9fafb;
}

.ip-page .info-banner-compact {
    border-radius: 0;
}

.ip-table-scroll-inner {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
    -webkit-overflow-scrolling: touch;
}

.ip-action-group.is-page-hidden {
    display: none !important;
}

.ip-show-more-wrap {
    display: none;
    padding: 14px 16px 18px;
    border-top: 1px solid var(--border-light, #e5e7eb);
    background: #fff;
    text-align: center;
}

.ip-show-more-wrap.is-visible {
    display: block;
}

.ip-show-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: none;
    padding: 12px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: var(--text-primary, #111827);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ip-show-more-btn:hover {
    border-color: #c7d2fe;
    background: #f8fafc;
    box-shadow: none;
}

.ip-show-more-btn:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.45);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .ip-page .finance-detail-header-inner {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ip-page .ip-intro,
    .ip-page .ip-filters-card,
    .ip-page .ip-person-hero {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ip-page .ip-back-link {
        margin-left: 12px;
        margin-right: 12px;
    }

    .ip-page .finance-sidebar-col {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ip-page #influentialTable {
        min-width: 0 !important;
        width: 100%;
        display: block;
    }

    .ip-page #influentialTable thead {
        display: none;
    }

    .ip-page #influentialTable tbody.ip-action-group {
        display: block;
        border-bottom: 1px solid #e5e7eb;
        padding: 14px 0 4px;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row > td {
        display: block;
        width: 100% !important;
        max-width: 100%;
        padding: 0 12px !important;
        border: none;
        box-sizing: border-box;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row > td.date-col {
        order: 1;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row > td.details-cell {
        order: 2;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row > td.assets-col {
        display: block;
        order: 3;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row > td.assets-col::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--text-tertiary, #9ca3af);
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-row > td.assets-col .offer-chips.stacked {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-desc-row {
        display: block;
    }

    .ip-page #influentialTable tbody.ip-action-group tr.ip-desc-row > td {
        display: block;
        width: 100%;
        padding: 10px 12px 14px !important;
        border: none;
    }

    .ip-page .ip-table-scroll-inner {
        overflow-x: hidden;
    }

    .ip-page .ip-desc-cell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ip-page .info-banner-compact {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ip-page .info-banner-details {
        padding-left: 36px;
        padding-right: 12px;
    }

    .ip-page .commodity-table th:first-child,
    .ip-page .commodity-table td:first-child {
        padding-left: 12px;
    }

    .ip-page .commodity-table th:last-child,
    .ip-page .commodity-table td:last-child {
        padding-right: 12px;
    }

    .ip-show-more-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }
}
