/* ==========================================================================
   loan-population-table.css
   --------------------------------------------------------------------------
   1. טבלת מסלולי ההלוואה לאוכלוסיות (Controls/Content/LoanPopulationTable.ascx, .lpt)
   2. טיזרי פתיחת חשבון לסטודנטים (App_Code/BLL/Loans/StudentBankOffers.cs, .sbo-*)
   נטען ל-head מהקונטרול או מ-StudentBankOffers.RegisterCss, פעם אחת לדף.

   הטבלה משותפת למאמר הסטודנטים (בתוך .article-table-scroll, עם המחלקה הלגאסית
   .tableArticle) ולדף השוואת ההלוואות (בתוך .sm-lc .lc-scroller, עם .lc-cmp).
   ⚠️ שני ההקשרים נושאים כללים משלהם: compareTables.css (.tableArticle td: גבול
   שחור ו-padding של 2%), loan-calculator.css (.sm-lc .lc-cmp td: nowrap ומרכוז)
   ו-compare-loans.css (.lcmp .lpt td:last-child: min-width 260px). לכן כל כלל
   כאן מתחיל ב-".lpt-wrap table.lpt.lpt" (0,3,1 ומעלה), שגובר על כולם בלי !important.

   מבנה: לכל מלווה שתי שורות. tr.lpt-row עם הערכים הקצרים, ו-tr.lpt-note עם
   התנאים והקישור לדף המלווה, ברוחב מלא. מתחת ל-640px כל זוג הופך לכרטיס.
   ========================================================================== */

.lpt-wrap { margin: 1rem 0; max-width: 100%; }

.lpt-wrap table.lpt.lpt {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #d9e6e1;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2d2a;
    table-layout: auto;
}

.lpt-wrap table.lpt.lpt caption {
    caption-side: top;
    text-align: right;
    padding: 0 2px 8px;
    color: #4a5a56;
    font-size: 14px;
    font-weight: 600;
}

.lpt-wrap table.lpt.lpt th,
.lpt-wrap table.lpt.lpt td {
    border: 0;
    padding: 10px 12px;
    text-align: right;
    vertical-align: top;
    background: transparent;
    word-wrap: normal;
    min-width: 0;
    font-size: inherit;
}

.lpt-wrap table.lpt.lpt thead th {
    background: #eef4f2;
    color: #17765a;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 1px solid #d9e6e1;
    vertical-align: bottom;
}
.lpt-wrap table.lpt.lpt thead th:first-child { border-top-right-radius: 10px; }
.lpt-wrap table.lpt.lpt thead th:last-child { border-top-left-radius: 10px; }

/* ערכים קצרים: לא נשברים לשורות ("לא בדף", "84 חודשים", "עד 3 שנים") */
.lpt-wrap table.lpt.lpt .lpt-row th,
.lpt-wrap table.lpt.lpt .lpt-row td.lpt-num {
    white-space: nowrap;
}
.lpt-wrap table.lpt.lpt .lpt-row th { font-weight: 700; color: #0f3d33; }
.lpt-wrap table.lpt.lpt .lpt-row td.lpt-num { font-variant-numeric: tabular-nums; }

/* הריבית: השורה הראשית מודגשת, "X% לפי הפריים היום" מתחת בקטן */
.lpt-wrap table.lpt.lpt .lpt-row td.lpt-rate { min-width: 0; white-space: normal; }
.lpt-wrap table.lpt.lpt .lpt-rate b { font-weight: 700; white-space: nowrap; }
.lpt-wrap table.lpt.lpt .lpt-rate small { display: block; color: #5b6b67; font-size: 13px; white-space: nowrap; }

.lpt-wrap table.lpt.lpt .lpt-na { color: #7a8783; white-space: nowrap; cursor: help; text-decoration: underline dotted #b9c5c1; text-underline-offset: 3px; }

/* שורת התנאים: ברוחב מלא, מתחת לשורת המלווה */
.lpt-wrap table.lpt.lpt .lpt-note td {
    padding-top: 0;
    padding-bottom: 12px;
    color: #4a5a56;
    font-size: 13.5px;
    line-height: 1.55;
    white-space: normal;
    border-bottom: 1px solid #e6eeeb;
}
.lpt-wrap table.lpt.lpt tbody:last-child .lpt-note:last-child td { border-bottom: 0; }
.lpt-wrap table.lpt.lpt .lpt-note a { color: #17765a; font-weight: 600; white-space: nowrap; }

/* פסים לסירוגין לפי מלווה (שתי השורות יחד) */
.lpt-wrap table.lpt.lpt tr.lpt-alt > th,
.lpt-wrap table.lpt.lpt tr.lpt-alt > td { background: #f7faf9; }

/* כותרת אוכלוסייה (כשהטבלה מציגה כמה אוכלוסיות) */
.lpt-wrap table.lpt.lpt .lpt-group th {
    background: #eef4f1;
    color: #0f5a47;
    font-weight: 800;
    white-space: normal;
    border-bottom: 1px solid #d9e6e1;
    border-top: 1px solid #d9e6e1;
}

/* בדף ההשוואה המכל (.lc-scroller) כבר מצייר מסגרת ופינות */
.lc-scroller .lpt-wrap { margin: 0; }
.lc-scroller .lpt-wrap table.lpt.lpt { border: 0; border-radius: 0; }

/* ---------- מובייל: כרטיס לכל מלווה ---------- */
@media (max-width: 640px) {
    .lpt-wrap table.lpt.lpt,
    .lpt-wrap table.lpt.lpt tbody,
    .lpt-wrap table.lpt.lpt tr,
    .lpt-wrap table.lpt.lpt th,
    .lpt-wrap table.lpt.lpt td { display: block; width: auto; }
    .lpt-wrap table.lpt.lpt { border: 0; background: transparent; border-radius: 0; }
    .lpt-wrap table.lpt.lpt caption { display: block; padding: 0 0 8px; }
    /* הכותרות נשארות לקוראי מסך */
    .lpt-wrap table.lpt.lpt thead {
        display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    }

    .lpt-wrap table.lpt.lpt tr.lpt-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px 12px;
        margin-top: 10px;
        padding: 12px 14px 6px;
        background: #fff;
        border: 1px solid #d9e6e1;
        border-bottom: 0;
        border-radius: 10px 10px 0 0;
    }
    .lpt-wrap table.lpt.lpt tr.lpt-row > th {
        grid-column: 1 / -1;
        padding: 0 0 6px;
        font-size: 16px;
        border-bottom: 1px solid #eef4f2;
        margin-bottom: 4px;
        background: transparent;
    }
    .lpt-wrap table.lpt.lpt tr.lpt-row > td { padding: 4px 0; background: transparent; }
    .lpt-wrap table.lpt.lpt tr.lpt-row > td::before {
        content: attr(data-label);
        display: block;
        color: #5b6b67;
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1.3;
    }
    .lpt-wrap table.lpt.lpt tr.lpt-row > td.lpt-rate { grid-column: 1 / -1; }

    .lpt-wrap table.lpt.lpt tr.lpt-note {
        padding: 0 14px 12px;
        background: #fff;
        border: 1px solid #d9e6e1;
        border-top: 0;
        border-radius: 0 0 10px 10px;
    }
    .lpt-wrap table.lpt.lpt tr.lpt-note td { padding: 8px 0 0; border: 0; border-top: 1px dashed #e0e9e6; background: transparent; }
    .lpt-wrap table.lpt.lpt tr.lpt-alt > th,
    .lpt-wrap table.lpt.lpt tr.lpt-alt > td { background: transparent; }
    .lpt-wrap table.lpt.lpt .lpt-group th { margin-top: 14px; border: 0; border-radius: 8px; padding: 8px 12px; }

    /* בדף ההשוואה: המכל לא מצייר מסגרת סביב הכרטיסים */
    .lc-scroller:has(.lpt-wrap) { border: 0; border-radius: 0; overflow: visible; }
}

/* ==========================================================================
   2. טיזרי פתיחת חשבון לסטודנטים (.sbo)
   ========================================================================== */
.sbo { margin: 1.25rem 0 1.5rem; }
.sbo-title { margin: 0 0 10px; font-weight: 700; font-size: 17px; color: #0f3d33; }
.sbo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sbo-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 16px 16px;
    background: #fff;
    border: 1px solid #d9e6e1;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 61, 51, .05);
}
.sbo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; min-height: 28px; }
.sbo-logo { display: block; height: 28px; width: auto; max-width: 120px; }
.sbo-tag {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #5b6b67;
    background: #f1f4f3;
    border: 1px solid #e0e6e4;
    border-radius: 999px;
}
.sbo .sbo-card-title { margin: 0 0 6px; font-weight: 700; font-size: 16px; color: #1f2d2a; }
.sbo .sbo-points { margin: 0 0 14px; padding: 0 18px 0 0; list-style: disc; font-size: 14.5px; line-height: 1.55; color: #33433f; }
.sbo .sbo-points li { margin: 0 0 4px; }
.sbo .sbo-btn {
    margin-top: auto;
    display: block;
    min-height: 44px;
    padding: 10px 14px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: #17765a;
    border-radius: 8px;
    text-decoration: none;
}
.sbo .sbo-btn:hover, .sbo .sbo-btn:focus-visible { background: #0f5a47; color: #fff; text-decoration: none; }
.sbo .sbo-btn:focus-visible { outline: 3px solid #9fd3c1; outline-offset: 2px; }
.sbo-foot { margin: 8px 0 0; font-size: 13px; color: #5b6b67; }

/* באנר הסיידבר */
.sbo-side { position: relative; margin: 15px auto 5px; max-width: 300px; }
.sbo-side img { display: block; width: 100%; height: auto; border-radius: 6px; }
.sbo-side .sbo-tag { position: absolute; top: 6px; left: 6px; background: rgba(255, 255, 255, .92); }

@media (max-width: 640px) {
    .sbo-grid { grid-template-columns: 1fr; }
}

/* 13/11/2026: כפתור פתיחת חשבון סטודנט בשורות הפועלים ודיסקונט בטבלה (LoanPopulationTable.OfferUtm) */
.lpt-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.lpt-offer__btn { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border-radius: 8px; background: #17765a; color: #fff !important; font-weight: 700; font-size: 14.5px; text-decoration: none !important; }
.lpt-offer__btn:hover, .lpt-offer__btn:focus-visible { background: #0f5a47; }
.lpt-offer__btn:focus-visible { outline: 3px solid #9fd3c1; outline-offset: 2px; }
