/* Minification failed. Returning unminified contents.
(7,10): run-time error CSS1030: Expected identifier, found '#main'
(7,23): run-time error CSS1031: Expected selector, found ')'
(7,23): run-time error CSS1025: Expected comma or open brace, found ')'
(14,10): run-time error CSS1030: Expected identifier, found '#main'
(14,23): run-time error CSS1031: Expected selector, found ')'
(14,23): run-time error CSS1025: Expected comma or open brace, found ')'
(25,11): run-time error CSS1030: Expected identifier, found '.'
(25,19): run-time error CSS1031: Expected selector, found ')'
(25,19): run-time error CSS1025: Expected comma or open brace, found ')'
(70,17): run-time error CSS1039: Token not allowed after unary operator: '-bs-secondary-color'
(660,15): run-time error CSS1030: Expected identifier, found '.'
(660,23): run-time error CSS1031: Expected selector, found ')'
(660,23): run-time error CSS1025: Expected comma or open brace, found ')'
(674,14): run-time error CSS1030: Expected identifier, found '#main'
(674,27): run-time error CSS1031: Expected selector, found ')'
(674,27): run-time error CSS1025: Expected comma or open brace, found ')'
(680,14): run-time error CSS1030: Expected identifier, found '#main'
(680,27): run-time error CSS1031: Expected selector, found ')'
(680,27): run-time error CSS1025: Expected comma or open brace, found ')'
(1058,10): run-time error CSS1030: Expected identifier, found '#leadOffer'
(1058,34): run-time error CSS1031: Expected selector, found ')'
(1058,34): run-time error CSS1025: Expected comma or open brace, found ')'
(1063,14): run-time error CSS1030: Expected identifier, found '#leadOffer'
(1063,38): run-time error CSS1031: Expected selector, found ')'
(1063,38): run-time error CSS1025: Expected comma or open brace, found ')'
(1348,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(1350,24): run-time error CSS1039: Token not allowed after unary operator: '-kg-chart-btn-color'
(1351,28): run-time error CSS1039: Token not allowed after unary operator: '-kg-chart-btn-color'
 */
/**
 * KupatGemel.aspx - Bootstrap 5 overrides and RTL for fund details page
 * Works with YMMasterPage (already has dir="rtl" on html)
 */

/* וידוא ש-body ו-form לא מגבילים את המרכוז כשהדף הוא קופת גמל (#main.kg-main) */
body:has(#main.kg-main) {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}
body:has(#main.kg-main) form#form1 {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Override compareTables #main – full width on small screens, centered with max-width on desktop.
   .kg-main is added by script on this page for browsers that don't support :has() */
#main.kg-main,
#main:has(.kg-page) {
    width: 100% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* RTL and layout for KupatGemel */
.kupat-gemel-page {
    direction: rtl;
    text-align: right;
    /* הוספת padding-bottom כדי לאפשר גלילה נוספת מתחת לכפתור הקבוע */
    padding-bottom: 100px;
    /* בסיס קריאות: 16px — עקבי עם Bootstrap ו-NCAG לטקסט ראשי */
    font-size: 1rem;
}

/* היררכיית כותרות עמוד (דריסת compareTables) */
.kupat-gemel-page .h1Title {
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    line-height: 1.35;
    font-weight: 700;
}

.kupat-gemel-page .h2Title {
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Cards: keep original title styling for data sections */
.kupat-gemel-page .card-header.gemel-card-header {
    background-color: #829a2c;
    color: #fff;
    font-weight: bold;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1.0625rem;
    line-height: 1.35;
}

/* כיתוב משני אחיד (תחת גרפים, מיון) — 14px */
.kg-muted-caption {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--bs-secondary-color);
}

.kg-page .card {
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Tables inside cards - preserve original gemelTable look with Bootstrap */
.kg-page .table.gemelTable {
    margin-bottom: 0;
    /* דריסת compareTables 14px + איחוד עם תאים */
    font-size: 1rem;
    line-height: 1.45;
}

.kg-page .table.gemelTable .titleCell,
.kg-page .table.gemelTable th.titleCell {
    background-color: #829a2c;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.kg-page .table.gemelTable .titleCell2 {
    background-color: #edf2f5;
    font-weight: 600;
}

.kg-page .table.gemelTable .gemelCellDetailsTitle,
.kg-page .table.gemelTable .gemelCellDetailsBody,
.kg-page .table.gemelTable th.gemelCellDetailsTitle {
    /* דריסת compareTables 12px — גוף טבלה בגודל בסיס קריא */
    font-size: 1rem !important;
    line-height: 1.45;
}

.kg-page .table.gemelTable .gemelCellDetailsTitle {
    background-color: #f8f9fa;
    font-weight: 500;
    /* override compareTables.css text-indent:8px — יישור RTL נקי בכל טבלאות דף הקופה */
    text-indent: 0;
}

/* מובייל: עמודת הכותרת ~30%, עמודת הערכים ~70% (ההפך מרוחב קבוע 265px שדוחק את המספרים) */
@media (max-width: 576px) {
    .kg-page .table.gemelTable {
        table-layout: fixed;
        width: 100%;
    }

    .kg-page .table.gemelTable td.gemelCellDetailsTitle {
        width: 30% !important;
        max-width: 30%;
        box-sizing: border-box;
        word-break: break-word;
        hyphens: auto;
    }

    .kg-page .table.gemelTable td.gemelCellDetailsBody {
        width: 70% !important;
        box-sizing: border-box;
    }

    /* יתרות: צמצום ~15% לעמודת הכותרות (מ־30% ל־25%) כדי לפנות מקום לערכים */
    .kg-page .table.gemelTable.kg-mob-table-balances td.gemelCellDetailsTitle {
        width: 25% !important;
        max-width: 25%;
    }

    .kg-page .table.gemelTable.kg-mob-table-balances td.gemelCellDetailsBody {
        width: 75% !important;
    }

    /* חשיפות וחלוקה לנכסים: עמודה ראשונה מתחת ל־50%, table-layout כדי לדרוס Width="230px" */
    .kg-page .table.gemelTable.kg-mob-3col-first-narrow {
        table-layout: fixed;
    }

    .kg-page .table.gemelTable.kg-mob-3col-first-narrow th:nth-child(1),
    .kg-page .table.gemelTable.kg-mob-3col-first-narrow td:nth-child(1) {
        width: 38% !important;
        max-width: 40% !important;
        min-width: 0;
        box-sizing: border-box;
        word-break: break-word;
        hyphens: auto;
    }

    .kg-page .table.gemelTable.kg-mob-3col-first-narrow th:nth-child(2),
    .kg-page .table.gemelTable.kg-mob-3col-first-narrow td:nth-child(2) {
        width: 22% !important;
        box-sizing: border-box;
    }

    .kg-page .table.gemelTable.kg-mob-3col-first-narrow th:nth-child(3),
    .kg-page .table.gemelTable.kg-mob-3col-first-narrow td:nth-child(3) {
        width: 40% !important;
        box-sizing: border-box;
    }

    /* שורות כותרת משנה (תא יחיד / colspan) */
    .kg-page .table.gemelTable.kg-mob-3col-first-narrow tr > td:only-child,
    .kg-page .table.gemelTable.kg-mob-3col-first-narrow tr > th:only-child {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.kg-page .table.gemelTable .coloredCell .gemelCellDetailsTitle,
.kg-page .table.gemelTable tr.coloredCell td {
    background-color: #e8f4f0;
}

/* Positive/negative numbers */
.kg-page .text-positive { color: #006633; }
.kg-page .text-negative { color: #D01D30; }

/* Breadcrumb – רווחים נאותים, תמיכה ב-RTL (::after במקום ::before) */
.kg-page .breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0;
}
.kg-page .breadcrumb-item {
    padding-inline: 0.35rem;
}
.kg-page .breadcrumb-item + .breadcrumb-item::before {
    content: none;
}
.kg-page .breadcrumb-item:not(:last-child)::after {
    padding-inline: 0.5rem;
    color: #17765a;
    content: "›";
}
.kg-page .breadcrumb-item a {
    color: #17765a;
    text-decoration: none;
}
.kg-page .breadcrumb-item a:hover {
    color: #0f5a42;
    text-decoration: underline;
}
.kg-page .breadcrumb-item.active {
    color: #212529;
}

.kg-page .kupat-back-link {
    display: inline-block;
    margin-top: 0.5rem;
}

/* Quick search card above general data */
#kgQuickSearchCard .form-label {
    color: #1f2937;
}

#kgQuickSearchResults .list-group-item mark {
    background-color: #fff3bf;
    padding: 0;
}

#kgQuickSearchButton {
    min-height: 38px;
}

/* Insights מתחת לשורות טבלת היתרות */
.kg-flow-insight {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: right;
    direction: rtl;
    color: #6c757d;
}

.kg-flow-insight-icon {
    flex-shrink: 0;
    margin-top: 0.08em;
    font-size: 1em;
    line-height: 1;
    opacity: 0.9;
    color: inherit;
}

.kg-flow-insight-text {
    flex: 1;
    min-width: 0;
}

/* סימולציית צבירה (דף קופה) */
.kg-sim-card-lead {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0 0 0.875rem;
}

.kg-sim-warning-text {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
    color: #664d03;
    margin: 0;
    padding: 0.65rem 0.75rem;
    background: #fff8e6;
    border: 1px solid rgba(200, 150, 0, 0.35);
    border-radius: 0.375rem;
}

.kg-sim-warning-icon {
    margin-inline-end: 0.25rem;
}

.kg-accumulation-sim-card .form-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.kg-sim-result-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.kg-sim-result-value {
    font-size: 1.28rem;
    font-weight: 700;
    color: #1e4620;
    line-height: 1.3;
}

.kg-sim-result-value.kg-sim-result-value--negative {
    color: #d01d30;
}

@media (max-width: 576px) {
    .kg-sim-result-value {
        font-size: 1.08rem;
    }
}

/* כפתורי תקופה במחשבון הסימולציה — עקביות עם ערכת הצבעים */
.kg-accumulation-sim-card .kg-sim-period-btn.active {
    background-color: #1e4620;
    border-color: #1e4620;
    color: #fff;
}

/* גרף סימולציית צבירה — ערך תיק מול הפקדות מצטברות */
.kg-sim-chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    min-height: 260px;
}
.kg-sim-chart-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
@media (max-width: 767.98px) {
    .kg-sim-chart-container {
        height: 280px;
        min-height: 240px;
    }
}

/* טיזר למחשבון ריבית דריבית (לפני גרף סימולציה) */
#kg-accumulation-sim-card .kg-sim-compound-teaser .kg-sim-compound-teaser-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

#kg-accumulation-sim-card .kg-sim-compound-teaser a {
    white-space: normal;
    word-break: break-word;
}

/* ניתוח ביצועי הקופה — מתחת לטבלת נתונים כלליים (לא בתוך הטבלה) */
.kg-page .kg-fund-performance-analysis {
    margin-top: 0.75rem;
    padding: 0 0 0.875rem;
    background-color: #fafbf9;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.375rem;
    overflow: hidden;
    box-sizing: border-box;
}

.kg-page .kg-fund-performance-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    background-color: #829a2c;
    padding: 0.5rem 0.75rem;
    margin: 0 0 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

/* מרווח תחתון כמו בין כרטיסי האזורים (תואם .kg-fund-summary-zone margin-bottom) */
.kg-page .kg-fund-performance-analysis .kg-fund-summary {
    padding: 0 0.75rem;
    margin: 0;
}

/* אזורים: תשואות / יתרות / דמי ניהול — כרטיסיות עם פס ירוק-זית כמו כותרות הכרטיס */
.kg-page .kg-fund-summary-zone {
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.875rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    border-inline-start: 4px solid #829a2c;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.kg-page .kg-fund-summary-zone:last-child {
    margin-bottom: 0;
}

.kg-page .kg-fund-summary-zone-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #5a6b20;
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e9ecef;
}

.kg-page .kg-fund-summary-zone-body {
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
}

/* אזור יתרות: בלי ul/li — שורות div מיושרות לימין כמו שאר גוף הכרטיס (בלי ריווח שמאלי של רשימה) */
.kg-page .kg-fund-summary-zone--balances .kg-fund-summary-zone-body {
    direction: rtl;
    text-align: right;
}

.kg-page .kg-fund-summary-zone--balances .kg-fund-summary-flow.kg-fund-summary-flow--stacked {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.kg-page .kg-fund-summary-zone--balances .kg-fund-summary-flow-row {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: right;
    box-sizing: border-box;
}

.kg-page .kg-fund-summary-zone--balances .kg-fund-summary-flow-label {
    color: #495057;
    font-weight: 700;
}

@media (max-width: 576px) {
    .kg-page .kg-fund-performance-analysis .kg-fund-summary {
        padding: 0 0.65rem;
    }

    .kg-page .kg-fund-summary-zone {
        padding: 0.65rem 0.75rem;
        margin-bottom: 0.65rem;
    }

    .kg-page .kg-fund-summary-zone-title {
        font-size: 0.9375rem;
    }
}

/* תוכן ניתוח ביצועים — גודל גוף */
.kg-fund-summary {
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
}

.kg-fund-summary-inner .kg-fund-summary-return-line {
    border-inline-start: 3px solid #829a2c;
    padding-inline-start: 0.65rem;
}

.kg-fund-summary-inner .kg-fund-summary-missing {
    border-inline-start-color: #adb5bd;
    font-style: normal;
    color: #6c757d;
}

.kg-fund-summary-cross {
    background: #f8f9fa;
    border-radius: 0.25rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.kg-fund-summary-tier-line {
    color: #1e4620;
}

.kg-fund-summary-tier-badges {
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: baseline;
}

.kg-fund-summary-badge {
    white-space: normal;
}

.kg-fund-summary-avg-note {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.45;
}

.kg-fund-summary-flow-label {
    font-weight: 600;
    color: #5c636a;
}

/* השוואה לממוצע בתקציר — ירוק מעל, אדום מתחת */
.kg-fund-summary .kg-vs-avg {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem;
    vertical-align: baseline;
}

.kg-fund-summary .kg-vs-avg-icon {
    flex-shrink: 0;
    font-size: 1em;
    line-height: 1;
}

.kg-fund-summary .kg-vs-avg-above .kg-vs-avg-text,
.kg-fund-summary .kg-vs-avg-above .kg-vs-avg-strong {
    color: #006633;
}

.kg-fund-summary .kg-vs-avg-below .kg-vs-avg-text,
.kg-fund-summary .kg-vs-avg-below .kg-vs-avg-strong {
    color: #d01d30;
}

.kg-fund-summary .kg-vs-avg-above .kg-vs-avg-icon {
    color: #006633;
}

.kg-fund-summary .kg-vs-avg-below .kg-vs-avg-icon {
    color: #d01d30;
}

/* תגי דירוג (מובילה / נגררת) */
.kg-fund-summary .kg-tier-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    white-space: normal;
}

.kg-fund-summary .kg-tier-leading .kg-tier-pill-strong {
    color: #006633;
}

.kg-fund-summary .kg-tier-leading .kg-tier-pill-icon {
    color: #006633;
}

.kg-fund-summary .kg-tier-lagging .kg-tier-pill-strong {
    color: #d01d30;
}

.kg-fund-summary .kg-tier-lagging .kg-tier-pill-icon {
    color: #d01d30;
}

.kg-fund-summary .kg-tier-mid .kg-tier-pill-icon {
    color: #6c757d;
}

.kg-fund-summary .kg-lead-phrase-good {
    color: #006633;
    font-weight: 600;
}

.kg-fund-summary .kg-lead-phrase-bad {
    color: #d01d30;
    font-weight: 600;
}

/* כפתור "בחזרה להשוואת קופות גמל" במובייל (ב-header) – עיצוב מודרני, בלי קו תחתון */
#backToIndex.kg-mobile-back-btn,
.kg-mobile-back-btn {
    text-decoration: none !important;
    white-space: nowrap;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
#backToIndex.kg-mobile-back-btn:hover,
#backToIndex.kg-mobile-back-btn:focus,
.kg-mobile-back-btn:hover,
.kg-mobile-back-btn:focus {
    text-decoration: none !important;
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

/* Override global compareTables: charts must flow in document, not position:absolute */
.kg-page .chartBase,
.kg-page .chart1,
.kg-page .chart2,
.kg-page .chart3 {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100%;
    border: 1px solid #bebebe;
    box-sizing: border-box;
}

/* Ensure data column and sidebar use flex flow, not float */
.kg-page .kg-data,
.kg-page .kg-sidebar {
    float: none !important;
}

/* Desktop: table + chart side by side (row .kg-table-chart has col-lg-6 | col-lg-6) */
.kg-page .kg-table-chart .chartBase {
    min-width: 0;
}

/* Prevent table column from overflowing into chart column */
.kg-page .kg-table-chart > .col-12 {
    min-width: 0;
}
.kg-page .kg-table-chart .table-responsive {
    overflow-x: auto;
}

/* Override compareTables .assetsDiv (width: 370px) so card fills column */
.kg-page .assetsDiv {
    width: 100%;
    max-width: 100%;
}

/* Table + dynamic/chart pairs: main table right (RTL), secondary left; stack on mobile */
.kg-page .kg-table-pair > .col-12 {
    min-width: 0;
}
.kg-page .kg-dynamic-col .table-responsive,
.kg-page .kg-chart-col .table-responsive {
    overflow-x: auto;
}

/* Mobile: stack table then chart; sidebar full width + תיקון HEADER + החלפת לוגיקת enquire */
@media (max-width: 767.98px) {
    .kg-page .kg-sidebar {
        max-width: 100%;
    }
    /* Show charts on mobile (supermarkerMobile.css hides .chartBase globally) */
    .kg-page .chartBase {
        display: block !important;
    }
    
    /* תיקון HEADER במובייל: רווח מתחת ל-HEADER ב-em (מתאים עצמו לגודל פונט) */
    #main.kg-main,
    #main:has(.kg-page) {
        padding-top: 1.55em !important;
        margin-top: 0 !important; /* mainNoMargin */
    }
    
    #ymheader {
        margin-top: 0 !important;
    }
    
    #mainContainer {
        padding-top: 0 !important;
    }
    
    /* החלפת JS: הסתרת לוגו וכותרת במובייל (רק בדף קופת גמל) */
    body:has(#main.kg-main) .searchBox .logo,
    body:has(#main.kg-main) .searchBox .logoContainer .logo,
    body:has(#main.kg-main) .searchBox .titleH1 {
        display: none !important;
    }
    
    body:has(#main.kg-main) .searchBox {
        height: 8% !important;
        min-height: 48px;
    }
    
    .kg-page .gemelTable {
        width: 100% !important;
    }
    
    .kg-page .titleButtom {
        width: 39% !important;
    }
    
    .kg-page .mainIndex {
        margin-top: 0;
    }
    
    .kg-page .kg-sidebar #lead {
        width: 99.4%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Narrow devices – same rules (no duplicate padding; 767.98px already covers this) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
    .kg-page .chartBase {
        display: block !important;
    }
}

/* ===== תשואות לאורך זמן – כותרת מרכזית וכפתורים נראים על רקע ירוק ===== */
#kg-returns-over-time-wrap .kg-returns-header {
    display: flex;
    justify-content: center;
    align-items: center;
}
#kg-returns-over-time-wrap .kg-returns-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
}
#kg-returns-over-time-wrap .gemel-card-header .kg-returns-period-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: transparent;
}
#kg-returns-over-time-wrap .gemel-card-header .kg-returns-period-btn:hover {
    color: #1a1a1a;
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #fff;
}
#kg-returns-over-time-wrap .gemel-card-header .kg-returns-period-btn.active {
    background-color: #fff;
    color: #1a1a1a;
    border-color: #fff;
}

/* כפתורי מיון מתחת לגרף תשואה–סיכון – מרווח סטנדרטי (צמוד לגרף) */
#kg-return-risk-chart-wrap .chart-container {
    margin-bottom: 0;
}
.kg-chart-sort-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
}
.kg-chart-sort-actions .btn-group {
    display: inline-flex;
}

/* תג דירוג הקופה בכותרת טבלת דירוג (נטען מ-fundDetailsLoader) */
.kg-page .fund-ranking-section #rankingBadge.badge.bg-primary {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0.45rem 0.8rem;
}

/* טבלת השוואת תשואות – סימון עמודת המיון הנבחרת */
.kg-page .fund-ranking-table thead th.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}
.kg-page .fund-ranking-table thead th.sortable-header:hover {
    background-color: #e9ecef !important;
}
.kg-page .fund-ranking-table thead th.sortable-header.sort-active {
    background-color: #0d6efd !important;
    color: #fff !important;
    font-weight: 600;
}
.kg-page .fund-ranking-table thead th.sortable-header.sort-active:hover {
    background-color: #0b5ed7 !important;
    color: #fff !important;
}

.kg-page .fund-ranking-table {
    font-size: 1rem;
}
.kg-page .fund-ranking-table th,
.kg-page .fund-ranking-table td {
    font-size: 1rem;
}

/* טבלת דירוג: מספרים ב־LTR — מינוס לפני המספר (wrapNumericLtr ב-fundDetailsLoader) */
.kg-page .fund-ranking-table .kg-numeric-ltr {
    display: inline-block;
    unicode-bidi: isolate;
    direction: ltr;
}

/* גרף תשואות לאורך זמן – גובה קבוע, בלי שטח ריק מתחת */
.kg-returns-chart-container {
    position: relative;
    width: 100%;
    height: 380px;
    min-height: 320px;
}
.kg-returns-chart-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* הודעה במחשבון: ביקשו 5 שנים אך נטענה תקופה קצרה יותר (לחיצה בלבד) */
#kg-accumulation-sim-card .kg-sim-period-availability-note {
    border-inline-start: 3px solid #6c757d;
    padding: 0.5rem 0.65rem;
    background: #f5f6f7;
    color: #343a40;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* הודעת fallback אחרי לחיצה על 5 שנים */
#kg-accumulation-sim-card .kg-sim-period-fallback-notice {
    border-inline-start: 3px solid #0d6efd;
    padding: 0.5rem 0.65rem;
    background: #eef5ff;
    color: #1a3a5c;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* כפתורי תקופה מושבתים כשאין מספיק היסטוריה */
.kg-returns-period-btn:disabled,
.kg-sim-period-btn:disabled {
    background: #f1f3f5 !important;
    border-color: #ced4da !important;
    color: #868e96 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

/* הסבר על היסטוריה חלקית / יישור חלון — גרף תשואות */
#kg-returns-over-time-wrap .kg-returns-disclaimer {
    border-inline-start: 3px solid #829a2c;
    padding: 0.5rem 0.65rem;
    background: #f8faf5;
    color: #3d4a2c;
    font-size: 0.875rem;
    line-height: 1.45;
}

#kg-returns-over-time-wrap .kg-returns-empty {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.kg-returns-card-body {
    padding-bottom: 1rem;
}
@media (max-width: 767.98px) {
    .kg-returns-chart-container {
        height: 408px;   /* +20% מ-340px לקריאות טובה יותר בין הקווים */
        min-height: 360px;
    }
}

/* ===== CTA מתחת לפרטים כלליים וטבלת התשואות ===== */
.kg-cta-block {
    text-align: center;
    padding: 0.5rem 0;
}
.kg-cta-btn {
    display: inline-block;
    max-width: 420px;
    width: 100%;
    padding: 0.65rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background-color: #4a7c7c;
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.kg-cta-btn:hover {
    background-color: #3d6b6b;
    color: #fff;
}
.kg-cta-sub {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* ===== כפתור "קבל הצעה" (leadOffer) – עיצוב מודרני, בלי קו תחתון, בלי תזוזה בלחיצה, צבע רקע אחד #17765a ===== */
#leadOffer.kg-lead-offer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    background-color: #17765a;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}
#leadOffer.kg-lead-offer:hover {
    background-color: #3d6b6b;
}
#openLead.kg-lead-cta-btn,
.kg-lead-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 50px;
    padding: 0.65rem 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    color: #fff;
    background-color: #17765a;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
/* כפתור צף בלבד: רקע שקוף כדי שיראה צבע ה-div #leadOffer */
#leadOffer.kg-lead-offer .kg-lead-cta-btn {
    background-color: transparent;
}
#openLead.kg-lead-cta-btn:hover,
#openLead.kg-lead-cta-btn:focus,
.kg-lead-cta-btn:hover,
.kg-lead-cta-btn:focus {
    text-decoration: none !important;
    color: #fff;
    background-color: #3d6b6b;
    border-color: transparent;
}
#leadOffer.kg-lead-offer .kg-lead-cta-btn:hover,
#leadOffer.kg-lead-offer .kg-lead-cta-btn:focus {
    background-color: transparent;
}
#openLead.kg-lead-cta-btn:active,
.kg-lead-cta-btn:active {
    text-decoration: none !important;
    color: #fff;
    background-color: #365a5a;
    border-color: transparent;
    padding: 0.65rem 1.25rem;
}
#leadOffer.kg-lead-offer .kg-lead-cta-btn:active {
    background-color: rgba(0,0,0,0.15);
}
#openLead.kg-lead-cta-btn:focus,
.kg-lead-cta-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(23, 118, 90, 0.5);
}
#openLead.kg-lead-cta-btn:focus-visible,
.kg-lead-cta-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(23, 118, 90, 0.5);
}

/* מודל ליד – רוחב צמוד לטופס, כותרת מהליד (h3) בלבן על רקע ירוק, כפתור סגירה בפינה */
#leadBootstrapModal.modal .lead-modal-dialog {
    width: fit-content;
    max-width: 520px;
    margin: 1rem auto;
}
#leadBootstrapModal .lead-modal-content {
    position: relative;
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    overflow: visible;
}
#leadBootstrapModal .lead-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    z-index: 10;
    opacity: 0.85;
    filter: invert(0);
    background-size: 1em;
}
#leadBootstrapModal [dir="rtl"] .lead-modal-close,
[dir="rtl"] #leadBootstrapModal .lead-modal-close {
    right: auto;
    left: 0.1rem;
}
#leadBootstrapModal .lead-modal-close:hover {
    opacity: 1;
}
#leadBootstrapModal .modal-body {
    background: #f9f9f9;
    padding: 0;
}
/* כותרת הליד (h3) – טקסט לבן על רקע ירוק כמו במקור; ריווח עליון וצדדי כדי שכפתור הסגירה לא ידרוס */
#leadBootstrapModal .lead .h3Title,
#leadBootstrapModal .lead .leadH3Title,
#leadBootstrapModal .lead .leadTitle {
    background-color: #17765a;
    color: #fff !important;
    font-weight: 600;
    margin: 0;
    padding: 0.75rem;
    border-radius: 4px 4px 0 0;
}
[dir="rtl"] #leadBootstrapModal .lead .h3Title,
[dir="rtl"] #leadBootstrapModal .lead .leadH3Title,
[dir="rtl"] #leadBootstrapModal .lead .leadTitle {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* במובייל: ריווח תחתון ל-#leadMobile כדי שהכפתור הדביק לא יכסה את הטופס (רק כשהוא בדף, לא בתוך המודל) */
@media (max-width: 767.98px) {
    #leadMobile {
        padding-bottom: 100px; /* גובה כפול מהכפתור (50px) */
    }
    /* בתוך פופאפ/מודל – בלי ריווח תחתון מיותר */
    .fancybox-wrap #leadMobile,
    .fancybox-inner #leadMobile,
    #leadBootstrapModal #leadMobile {
        padding-bottom: 0;
    }
    /* במובייל: מרווח מינימלי מכפתור הסגירה (X) כדי שלא ידרוס את הכותרת */
    #leadBootstrapModal .lead .h3Title,
    #leadBootstrapModal .lead .leadH3Title,
    #leadBootstrapModal .lead .leadTitle {
        padding: 0.75rem;
    }
    [dir="rtl"] #leadBootstrapModal .lead .h3Title,
    [dir="rtl"] #leadBootstrapModal .lead .leadH3Title,
    [dir="rtl"] #leadBootstrapModal .lead .leadTitle {
        padding: 0.75rem;
    }
}

/* תיקון תזוזה ימינה כשפופאפ Fancybox נפתח - מקזזים את התרחבות ה-viewport (scrollbar נעלם) */
html.fancybox-lock #leadOffer.kg-lead-offer {
    right: calc(1% + 17px);
}

/* הוספת padding-bottom לדף כדי לאפשר גלילה נוספת מתחת לכפתור הקבוע - גובה כפול מהכפתור (50px * 2 = 100px) */
body:has(#leadOffer.kg-lead-offer),
body:has(.getOffer.kg-lead-offer) {
    padding-bottom: 100px;
}
/* Fallback לדפדפנים שלא תומכים ב-:has() - מוסיפים padding-bottom ל-container הראשי */
.kg-page:has(#leadOffer.kg-lead-offer),
.kg-page:has(.getOffer.kg-lead-offer),
.kupat-gemel-page:has(#leadOffer.kg-lead-offer),
.kupat-gemel-page:has(.getOffer.kg-lead-offer) {
    padding-bottom: 100px;
}

/* Reset Bootstrap typography inside legacy lead control (YatzranimGemelPensia) - match compareTables 14px */
.lead-legacy-font-reset {
    font-size: 14px;
}
.lead-legacy-font-reset input,
.lead-legacy-font-reset select,
.lead-legacy-font-reset textarea,
.lead-legacy-font-reset label,
.lead-legacy-font-reset .leadFieldName {
    font-size: inherit;
}
.lead-legacy-font-reset .tbLead,
.lead-legacy-font-reset .leadInputText {
    font-size: 14px !important;
    height: 32px !important;
}
.lead-legacy-font-reset .kidomet.selectLead,
.lead-legacy-font-reset .kidomet {
    font-size: 14px !important;
    height: 34px !important;
}
.lead-legacy-font-reset #cbTnaim,
.lead-legacy-font-reset input[type="checkbox"] {
    vertical-align: middle !important;
}

/* ===== מחשבונים (#calcs) – אייקון SVG וסגנון קישורים ===== */
#calcs .h3Heading .calc-heading-icon {
    float: left;
    vertical-align: middle;
    margin-left: 6px;
    color: inherit;
    flex-shrink: 0;
}

/* וידוא שהטבלה תופסת את כל הרוחב הזמין */
#calcs table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

#calcs .calcTD td {
    vertical-align: middle;
    width: 100%;
    padding: 0;
}

#calcs .calcTD td a {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

#calcs a,
#calcs .calcLinks,
#calcs .calcLinksSubPage {
    color: #17765a;
    text-decoration: none;
    vertical-align: middle;
    line-height: 36px;
    height: 36px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

#calcs tr.calcTD:hover td,
#calcs .calcTD .calcLinks:hover,
#calcs .calcTD a:hover {
    background-color: #f7f7f3;
}

#calcs .calcTD td,
#calcs .calcTD .calcLinks {
    transition: background-color 0.15s ease;
}

/* Mobile: full width links */
@media (max-width: 768px) {
    #calcs .calcTD td a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    #calcs .calcTD .calcLinks,
    #calcs .calcTD .calcLinksSubPage {
        display: block !important;
        width: 100% !important;
    }
}

/* ============================================
   CompareKupotGemelDetails - Layout Bootstrap
   ============================================ */

/* Override gemelRight/gemelLeft floats for compare details page */
.kg-compare-details-page .kg-compare-row {
    margin-left: 0;
    margin-right: 0;
}

.kg-compare-details-page .kg-compare-titles .gemelTable,
.kg-compare-details-page .kg-compare-content .gemelTable {
    width: 100% !important;
}

/* Fund columns - min width for horizontal scroll on mobile */
.kg-compare-details-page .kg-compare-fund-col {
    min-width: 220px;
    vertical-align: top;
}

/* Chart wrapper in each fund column */
.kg-compare-details-page .kg-compare-chart-wrap {
    direction: rtl;
    width: 100%;
    border: 1px solid #d1d1d1;
    text-align: center;
    margin-top: 10px;
    border-radius: 4px;
}

.kg-compare-details-page .kg-compare-chart-wrap canvas {
    max-width: 100%;
}

.kg-compare-details-page .kg-compare-chart-wrap .chart {
    max-width: 100%;
    width: 100% !important;
}

/* Horizontal scroll for comparison table on mobile */
.kg-compare-details-page .kg-compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kg-compare-details-page .kg-compare-content .gemelLeftInner {
    width: 100%;
    position: static;
    right: auto;
    bottom: auto;
}

/* Mobile: stack titles above content, adjust spacing */
@media (max-width: 991.98px) {
    .kg-compare-details-page .kg-compare-titles {
        order: 1;
    }
    .kg-compare-details-page .kg-compare-content {
        order: 2;
    }
    .kg-compare-details-page .kg-compare-fund-col {
        min-width: 200px;
    }
    .kg-compare-details-page .kg-compare-table .kg-fund-col {
        min-width: 200px;
    }
}

/* Override gemelDetailsCell text-indent (from compareTables.css) - breaks RTL alignment when text wraps */
.kg-compare-details-page .gemelDetailsCell {
    text-indent: 0;
}

/* Override titleHight text-indent - same issue */
.kg-compare-details-page .titleHight {
    text-indent: 0;
}

/* Single compare table - fixed layout, widths from colgroup for equal fund columns */
.kg-compare-details-page .kg-compare-table {
    table-layout: fixed;
    width: 100%;
}

.kg-compare-details-page .kg-compare-table .kg-label-col {
    min-width: 180px;
}
.kg-compare-details-page .kg-compare-table .kg-fund-col {
    min-width: 200px;
}

/* Long fund names - wrap instead of expanding column */
.kg-compare-details-page .kg-compare-table .kg-fund-col .h1KupatGemel {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Exposures/Assets - two columns per fund, force LTR for correct left/right order */
.kg-compare-details-page .kg-compare-table .kg-exposure-cell {
    padding: 6px 8px;
    direction: ltr;
}
.kg-compare-details-page .kg-compare-table .kg-exposure-cell .kg-exposure-inner,
.kg-compare-details-page .kg-compare-table .kg-exposure-cell .kg-exposure-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    align-items: center;
}
.kg-compare-details-page .kg-compare-table .kg-exposures-subheader td,
.kg-compare-details-page .kg-compare-table .kg-assets-subheader td {
    background-color: #edf2f5;
    font-weight: 600;
}
.kg-compare-details-page .kg-compare-table .kg-exposures-subheader .kg-exposure-header,
.kg-compare-details-page .kg-compare-table .kg-assets-subheader .kg-exposure-header {
    font-size: 12px;
    color: #495057;
}

/* Section title rows - background for visual separation (נתונים כלליים, יתרות, תשואות, מדדי סיכון, etc.) */
.kg-compare-details-page .kg-compare-table tr.kg-section-title-row td {
    background-color: #d8dbb0;
    font-weight: 600;
}

/* שורת נתונים כלליים עם כפתורי CTA – עמודת הכותרת תמלא את גובה השורה (43px) */
.kg-compare-details-page .kg-compare-table tr.kg-section-title-row-with-cta td.titleHight {
    min-height: 43px;
}

/* תאים עם כפתור CTA לליד – מרכוז הכפתור בעמודת הקופה */
.kg-compare-details-page .kg-compare-table td.kg-lead-cta-cell {
    text-align: center;
    vertical-align: middle;
    padding: 6px 0.5rem;
}
.kg-compare-details-page .kg-compare-table td.kg-lead-cta-cell .kg-chart-btn {
    white-space: nowrap;
}

/* Titles column: remove fixed widths, fix font size and background alignment */
.kg-compare-details-page .kg-compare-titles .titleHight,
.kg-compare-details-page .kg-compare-content .titleHight,
.kg-compare-details-page .kg-compare-table .titleHight {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    font-size: 14px;
    height: auto;
    min-height: 30px;
    padding: 6px 0.5rem 6px 0;
    line-height: 1.35;
    display: flex;
    align-items: center;
}

/* Rows with title + graph button: flex, consistent gap between title and button */
.kg-compare-details-page .kg-compare-titles td.kg-title-with-btn,
.kg-compare-details-page .kg-compare-table td.kg-title-with-btn {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    padding-inline-end: 0.5rem;
}

.kg-compare-details-page .kg-compare-titles td.kg-title-with-btn .titleHight,
.kg-compare-details-page .kg-compare-table td.kg-title-with-btn .titleHight {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.kg-compare-details-page .kg-compare-titles td.kg-title-with-btn .graphButton,
.kg-compare-details-page .kg-compare-titles td.kg-title-with-btn .kg-chart-btn,
.kg-compare-details-page .kg-compare-table td.kg-title-with-btn .graphButton,
.kg-compare-details-page .kg-compare-table td.kg-title-with-btn .kg-chart-btn {
    float: none;
    flex-shrink: 0;
}

/* כפתורי גרפים – מצב רגיל: רקע מלא (#17765a), Hover: רקע כהה יותר */
.kg-compare-details-page .kg-chart-btn {
    --kg-chart-btn-color: #17765a;
    color: #fff !important;
    border-color: var(--kg-chart-btn-color) !important;
    background-color: var(--kg-chart-btn-color) !important;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.kg-compare-details-page .kg-chart-btn:hover {
    color: #fff !important;
    background-color: #0f5c47 !important;
    border-color: #0f5c47 !important;
}
.kg-compare-details-page .kg-chart-btn i {
    margin-left: 0.35em;
}

/* ===== מודלים – מרכוז בדסקטופ ===== */
.kg-compare-details-page .modal {
    justify-content: center !important;
    align-items: center !important;
}
.kg-compare-details-page .modal .modal-dialog {
    margin: 1.75rem auto !important;
}

/* כותרת ממורכזת + כפתור סגירה בפינה הימנית */
.kg-compare-details-page .modal-header.kg-modal-header-centered {
    position: relative;
    justify-content: center;
    padding-inline-end: 3rem;
}
.kg-compare-details-page .modal-header.kg-modal-header-centered .modal-title {
    text-align: center;
    margin: 0;
}
.kg-compare-details-page .modal-header.kg-modal-header-centered .btn-close {
    position: absolute;
    right: 1rem;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* מודל מדדי סיכון – רוחב. CookieManager.ascx מגדיר .modal-content { max-width: 600px } גלובלית – דריסה */
@media (min-width: 992px) {
    #modalTsuaSikon .modal-dialog.kg-modal-sikon-wider .modal-content {
        width: 1370px !important;
        max-width: 1370px !important;
    }
}
@media (max-width: 991.98px) {
    #modalTsuaSikon .modal-dialog.kg-modal-sikon-wider .modal-content {
        width: calc(100vw - 2rem) !important;
        max-width: none !important;
    }
}

/* מודל חלוקה לנכסים – דריסת max-width:600px מ-CookieManager */
@media (min-width: 992px) {
    #modalAssets .modal-content {
        width: 1140px !important;
        max-width: 1140px !important;
    }
}
@media (max-width: 991.98px) {
    #modalAssets .modal-content {
        width: calc(100vw - 2rem) !important;
        max-width: none !important;
    }
}

/* מודל חלוקה לנכסים – גרף עמודות מוערמות: גובה מספיק ל-chartArea (מקרא+צירים) במובייל */
#modalAssets .kg-modal-assets-bar-chart {
    position: relative;
    width: 100%;
    height: 320px;
    min-height: 320px;
    box-sizing: border-box;
}
@media (max-width: 991.98px) {
    #modalAssets .kg-modal-assets-bar-chart {
        height: 440px;
        min-height: 440px;
    }
}

/* גרפי מדדי סיכון – דסקטופ: זה לצד זה, גובה מוגדל */
.kg-sikon-charts-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
}
.kg-sikon-charts-row .kg-sikon-chart-container {
    position: relative;
    flex: 1;
    min-width: 380px;
}
.kg-sikon-charts-row .kg-sikon-chart-scatter {
    height: 420px;
    min-height: 420px;
}
.kg-sikon-charts-row .kg-sikon-chart-sharp {
    height: 380px;
    min-height: 380px;
}
/* מובייל – גרפים במבנה אנכי, גובה מספק */
@media (max-width: 991.98px) {
    .kg-sikon-charts-row {
        flex-direction: column;
    }
    .kg-sikon-charts-row .kg-sikon-chart-container {
        min-width: 0;
    }
    .kg-sikon-charts-row .kg-sikon-chart-scatter {
        height: 360px;
        min-height: 360px;
    }
    .kg-sikon-charts-row .kg-sikon-chart-sharp {
        height: 320px;
        min-height: 320px;
    }
}

/* טבלת מדדי סיכון במודל – קומפקטית (פחות מקום) */
.kg-compare-details-page #modalTsuaSikon .kg-modal-tsuot-table-wrap {
    width: 100%;
    padding: 0 0.5rem;
    margin-top: 1rem;
}
.kg-compare-details-page #modalTsuaSikon .kg-modal-sikon-table {
    background-color: #EDF1D8;
    font-weight: 600;
    font-size: 0.875rem;
}
.kg-compare-details-page #modalTsuaSikon .kg-modal-sikon-table .kg-modal-th {
    background-color: #d8dbb0;
    color: #1a1a1a;
    font-weight: 600;
    padding: 0.3rem 0.35rem;
    font-size: 0.8rem;
    border-color: rgba(0,0,0,0.1);
    vertical-align: middle;
}
.kg-compare-details-page #modalTsuaSikon .kg-modal-sikon-table td {
    padding: 0.25rem 0.35rem;
    font-size: 0.85rem;
    vertical-align: middle;
    border-color: rgba(0,0,0,0.1);
}

/* טבלת חלוקה לנכסים במודל */
.kg-modal-assets-table-wrap {
    width: 100%;
    padding: 0 0.5rem;
    margin-top: 1rem;
}
.kg-modal-assets-table {
    background-color: #EDF1D8;
    font-weight: 600;
    font-size: 0.875rem;
}
.kg-modal-assets-table .kg-modal-th {
    background-color: #d8dbb0;
    color: #1a1a1a;
    font-weight: 600;
    padding: 0.3rem 0.35rem;
    font-size: 0.8rem;
    border-color: rgba(0,0,0,0.1);
    vertical-align: middle;
}
.kg-modal-assets-table td {
    padding: 0.25rem 0.35rem;
    font-size: 0.85rem;
    vertical-align: middle;
    border-color: rgba(0,0,0,0.1);
}

/* טבלת תשואות במודל – עיצוב מודרני Bootstrap, בלי פינות תמונה */
.kg-compare-details-page #modalTsuot .kg-modal-tsuot-table-wrap {
    width: 100%;
    padding: 0 0.5rem;
}
.kg-compare-details-page #modalTsuot .kg-modal-tsuot-table {
    background-color: #EDF1D8;
    font-weight: 600;
}
.kg-compare-details-page #modalTsuot .kg-modal-tsuot-table .kg-modal-th {
    background-color: #d8dbb0;
    color: #1a1a1a;
    font-weight: 600;
    padding: 0.5rem 0.4rem;
    border-color: rgba(0,0,0,0.1);
    vertical-align: middle;
}
.kg-compare-details-page #modalTsuot .kg-modal-tsuot-table td,
.kg-compare-details-page #modalTsuot .kg-modal-tsuot-table .gemelCell {
    padding: 0.4rem 0.4rem;
    vertical-align: middle;
    border-color: rgba(0,0,0,0.1);
}

/* מובייל – מדדי סיכון: טבלה מתחת לגרף, גרפים ברוחב מלא */
@media (max-width: 991.98px) {
    .kg-compare-details-page #modalTsuaSikon .modal-body {
        display: flex;
        flex-direction: column;
        padding: 0.75rem;
    }
    .kg-compare-details-page #modalTsuaSikon #kg-sikon-over-time-wrap {
        order: 1;
        width: 100%;
    }
    .kg-compare-details-page #modalTsuaSikon .kg-sikon-card-body {
        padding-inline: 0;
    }
    .kg-compare-details-page #modalTsuaSikon .kg-modal-tsuot-table-wrap {
        order: 2;
        width: 100%;
        margin-top: 1rem;
        padding: 0;
    }
}

/* מובייל – טבלה מתחת לגרף, ממורכזת */
@media (max-width: 991.98px) {
    .kg-compare-details-page #modalTsuot .modal-body {
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }
    .kg-compare-details-page #modalTsuot #kg-returns-over-time-wrap {
        order: 1;
        width: 100%;
    }
    .kg-compare-details-page #modalTsuot .kg-modal-tsuot-table-wrap {
        order: 2;
        width: 100%;
        margin-top: 1rem;
        padding: 0;
    }
    .kg-compare-details-page #modalTsuot .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

/*
 * דף KupatGemel בלבד — טבלת דירוג שנטענת ל־#kg-dynamic-returns-table (fundDetailsLoader).
 * גופן טבלה 15px; רוחב מינימלי ועמודות מוכפלים ב־×1.15 ביחס לבסיס הקודם.
 */
@media (max-width: 767.98px) {
    #kg-dynamic-returns-table .fund-ranking-section .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    #kg-dynamic-returns-table .fund-ranking-table {
        direction: rtl;
        table-layout: fixed;
        width: 100%;
        min-width: 736px;
        margin-bottom: 0 !important;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th,
    #kg-dynamic-returns-table .fund-ranking-table tbody td,
    #kg-dynamic-returns-table .fund-ranking-table tfoot td {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th {
        font-size: 15px !important;
        line-height: 1.3 !important;
        vertical-align: top !important;
        padding-top: 0.4rem !important;
        padding-bottom: 0.5rem !important;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: manual;
    }

    #kg-dynamic-returns-table .fund-ranking-table tbody td,
    #kg-dynamic-returns-table .fund-ranking-table tfoot td {
        font-size: 15px !important;
        line-height: 1.28 !important;
        vertical-align: middle;
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th:nth-child(1),
    #kg-dynamic-returns-table .fund-ranking-table tbody td:nth-child(1) {
        width: 1.9rem;
        min-width: 1.9rem;
        max-width: 2.3rem;
        padding-inline-start: 0.1rem !important;
        /* מרווח מעמודת שם הקופה (ב־RTL — קצה משותף עם שם) */
        padding-inline-end: 0.45rem !important;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th.fund-ranking-col-name,
    #kg-dynamic-returns-table .fund-ranking-table tbody td.fund-ranking-col-name {
        width: 10.7rem;
        min-width: 10.7rem;
        max-width: none;
        box-sizing: border-box;
        /* דוחף את «שם קופה» מעט שמאלה — ריווח מכותרת/תוכן דירוג */
        padding-inline-start: 0.5rem !important;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th.fund-ranking-col-name {
        word-break: normal;
        overflow-wrap: normal;
    }

    #kg-dynamic-returns-table .fund-ranking-table tbody td.fund-ranking-col-name {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* כותרות עמודות מספריות: רוחב מעט גדול יותר, שבירה רק בין מילים אם צריך */
    #kg-dynamic-returns-table .fund-ranking-table thead th:nth-child(n+3):nth-child(-n+9) {
        width: 3.85rem;
        min-width: 3.68rem;
        max-width: 4.14rem;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }

    /* נתונים: שורה אחת כדי לשמור על גובה שורה נמוך */
    #kg-dynamic-returns-table .fund-ranking-table tbody td:nth-child(n+3):nth-child(-n+9) {
        width: 3.85rem;
        min-width: 3.68rem;
        max-width: 4.14rem;
        white-space: nowrap;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th:nth-child(10),
    #kg-dynamic-returns-table .fund-ranking-table tbody td:nth-child(10) {
        width: 5.3rem;
        min-width: 4.9rem;
        max-width: 6.05rem;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }

    #kg-dynamic-returns-table .fund-ranking-table thead th:nth-child(10) {
        vertical-align: top !important;
    }

    #kg-dynamic-returns-table .fund-ranking-table .btn {
        padding: 0.22rem 0.4rem !important;
        font-size: 14px !important;
        line-height: 1.22 !important;
    }
}

