/**
 * Financials mobile tab – desktop look adapted to mobile
 * Scoped to #fundamentals-mobile and .fundamentals-mobile
 */

#fundamentals-mobile,
.fundamentals-mobile {
    padding: 12px 16px 20px;
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Sub-tabs (Income Statement | Balance Sheet | Cash Flow) – desktop style
   --------------------------------------------------------------------------- */
#fundamentals-mobile .stock-sub-tabs,
.fundamentals-mobile .stock-sub-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1rem;
    gap: 0;
    background: transparent;
    padding-bottom: 0;
}

#fundamentals-mobile .stock-sub-tabs .nav-link,
.fundamentals-mobile .stock-sub-tabs .nav-link {
    position: relative;
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    background: transparent !important;
    border: none !important;
    white-space: nowrap;
    transition: color 0.2s ease;
}

#fundamentals-mobile .stock-sub-tabs .nav-link:hover,
.fundamentals-mobile .stock-sub-tabs .nav-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

#fundamentals-mobile .stock-sub-tabs .nav-link.active,
.fundamentals-mobile .stock-sub-tabs .nav-link.active,
#fundamentals-mobile .stock-sub-tabs .nav-link.active i,
.fundamentals-mobile .stock-sub-tabs .nav-link.active i {
    color: #fff !important;
    background: transparent !important;
}

#fundamentals-mobile .stock-sub-tabs .nav-link.active::after,
.fundamentals-mobile .stock-sub-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: #3b82f6;
    border-radius: 2px 2px 0 0;
}

#fundamentals-mobile .stock-sub-tabs .nav-link i,
.fundamentals-mobile .stock-sub-tabs .nav-link i {
    margin-right: 0.35rem;
    font-size: 0.9em;
    opacity: 0.8;
}

#fundamentals-mobile .stock-sub-tabs .nav-link.active i,
.fundamentals-mobile .stock-sub-tabs .nav-link.active i {
    opacity: 1;
}

/* ---------------------------------------------------------------------------
   Statement header & legend
   --------------------------------------------------------------------------- */
#fundamentals-mobile .statement-header,
.fundamentals-mobile .statement-header {
    margin-bottom: 0.75rem;
}

#fundamentals-mobile .statement-header .statement-legend,
.fundamentals-mobile .statement-header .statement-legend {
    margin: 0;
}

#fundamentals-mobile .statement-header .text-muted,
.fundamentals-mobile .statement-header .text-muted {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------------------
   Table wrapper – horizontal scroll
   --------------------------------------------------------------------------- */
#fundamentals-mobile .table-wrapper,
.fundamentals-mobile .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------------------
   Table – desktop-style .table-main / .fundamentals-table
   --------------------------------------------------------------------------- */
#fundamentals-mobile .table-main,
#fundamentals-mobile .fundamentals-table,
.fundamentals-mobile .table-main,
.fundamentals-mobile-table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

#fundamentals-mobile .table-main thead th,
.fundamentals-mobile .table-main thead th,
.fundamentals-mobile-table thead th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#fundamentals-mobile .table-main tbody td,
.fundamentals-mobile .table-main tbody td,
.fundamentals-mobile-table tbody td {
    padding: 0.4rem 0.6rem;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

#fundamentals-mobile .table-main tbody tr:hover,
.fundamentals-mobile .table-main tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

#fundamentals-mobile .table-main tbody tr:hover td,
.fundamentals-mobile .table-main tbody tr:hover td {
    background: transparent;
}

/* Section headers (category rows) */
#fundamentals-mobile .table-main tbody tr.section-header td,
#fundamentals-mobile .table-main tbody tr.main-category td,
.fundamentals-mobile .table-main tbody tr.section-header td,
.fundamentals-mobile .table-main tbody tr.main-category td,
.fundamentals-mobile-table .section-header td {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#fundamentals-mobile .table-main tbody tr.section-header td i,
.fundamentals-mobile .table-main tbody tr.main-category td i {
    opacity: 0.8;
}

/* Value colors (match desktop) */
#fundamentals-mobile .table-main .positive,
.fundamentals-mobile .table-main .positive {
    color: #22c55e;
}

#fundamentals-mobile .table-main .negative,
.fundamentals-mobile .table-main .negative {
    color: #ef4444;
}

#fundamentals-mobile .table-main .strong-positive,
.fundamentals-mobile .table-main .strong-positive {
    color: #16a34a;
    font-weight: 600;
}

#fundamentals-mobile .table-main .strong-negative,
.fundamentals-mobile .table-main .strong-negative {
    color: #dc2626;
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Statement footer
   --------------------------------------------------------------------------- */
#fundamentals-mobile .statement-footer,
.fundamentals-mobile .statement-footer {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#fundamentals-mobile .statement-footer .footer-notes,
.fundamentals-mobile .statement-footer .footer-notes {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

#fundamentals-mobile .statement-footer .footer-notes i,
.fundamentals-mobile .statement-footer .footer-notes i {
    margin-right: 0.35rem;
    opacity: 0.8;
}

/* ---------------------------------------------------------------------------
   No data message
   --------------------------------------------------------------------------- */
#fundamentals-mobile .no-data-message,
.fundamentals-mobile .no-data-message {
    padding: 1.5rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
}

#fundamentals-mobile .no-data-message i,
.fundamentals-mobile .no-data-message i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

#fundamentals-mobile .no-data-message h5,
.fundamentals-mobile .no-data-message h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.35rem;
}

#fundamentals-mobile .no-data-message p,
.fundamentals-mobile .no-data-message p {
    margin: 0;
    font-size: 0.8125rem;
}

#fundamentals-mobile .no-data-message p small,
.fundamentals-mobile .no-data-message p small {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.4);
}
