/* tables26.css */

/* ==========================================================
   חלק 1: עיצוב בסיסי (תמיכה כפולה ב- .myTable וב- #myTable)
   ========================================================== */

/* עיצוב נייח - נקי עם כותרת תכלת פסטל */
.myTable, #myTable { /* תומך גם ב-Class וגם ב-ID הישן */
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 25px 0 !important;
    border: 1px solid #e0e8f0 !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    table-layout: auto !important; /* מאפשר לתאים להתרחב לפי התוכן */
}

/* עטיפה למניעת דחיסה במצבי ביניים (ללא שינוי) */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* החלת עיצוב הכותרת על שני הסוגים */
.myTable thead th, #myTable thead th { 
    background-color: #f0f7ff !important; 
    color: #054c78 !important; 
    padding: 8px 15px !important; 
    line-height: 1.2 !important; 
    border-bottom: 2px solid #d1e6f3 !important;
    border-right: 1px solid #d1e6f3 !important;
    text-align: right !important;
    font-weight: bold !important;
    white-space: nowrap !important; /* מונע שבירת שורה בכותרת בנייח */
}

/* החלת עיצוב התאים על שני הסוגים */
.myTable td, #myTable td { 
    padding: 10px 15px !important;
    border: 1px solid #f0f4f8 !important;
    vertical-align: top !important;
    line-height: 1.4 !important;
    color: #444 !important;
}

/* ==========================================================
   חלק 2: מובייל וטאבלט (תמיכה כפולה ב- .myTable וב- #myTable)
   ========================================================== */
@media screen and (max-width: 1024px) {
    /* הפיכת כל חלקי הטבלה לבלוקים רספונסיביים לשני הסוגים */
    .myTable, .myTable thead, .myTable tbody, .myTable tr, .myTable td,
    #myTable, #myTable thead, #myTable tbody, #myTable tr, #myTable td { 
        display: block !important; 
        width: 100% !important; 
        box-sizing: border-box !important;
    }

    /* הסתרת הכותרת המקורית לשני הסוגים */
    .myTable thead, #myTable thead { display: none !important; }

    /* עיצוב השורה כ"כרטיס" לשני הסוגים */
    .myTable tr, #myTable tr {
        margin-bottom: 25px !important;
        border: 1px solid #d1e6f3 !important;
        border-radius: 10px !important;
        background: #fff !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
        clear: both;
    }

    /* עיצוב התא בתוך הכרטיס לשני הסוגים */
    .myTable td, #myTable td {
        position: relative !important;
        /* הצד הימני (הכותרת) תופס 35% מהרוחב */
        padding-right: 35% !important; 
        padding-left: 15px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        border: none !important;
        border-bottom: 1px solid #f0f4f8 !important;
        min-height: 38px !important;
        text-align: right !important;
        float: none !important; /* מבטל דחיפה שמאלה */
    }

    /* הסרת קו מפריד תחתון לתא האחרון לשני הסוגים */
    .myTable td:last-child, #myTable td:last-child { border-bottom: none !important; }

    /* יצירת הכותרת הימנית (data-label) לשני הסוגים */
    .myTable td::before, #myTable td::before {
        content: attr(data-label) ": " !important;
        position: absolute !important;
        right: 15px !important;
        top: 10px !important;
        
        /* הכותרת תופסת 25% מהרוחב (קצת פחות מה-padding כדי שיהיה רווח) */
        width: 25% !important; 
        
        color: #054c78 !important; 
        font-weight: bold !important;
        font-size: 0.85rem !important;
        
        /* --------------------------------------------------
           ביטול החיתוך ואפשור גלישת שורה (מהתיקון הקודם)
           -------------------------------------------------- */
        white-space: normal !important; 
        overflow: visible !important; 
        line-height: 1.2 !important; 
    }
}

/* ==========================================================
   חלק 3: תצוגת כרטיסיות חלופית (ללא שינוי)
   ========================================================== */

/* בנייח - הכל כרגיל */
#mobile-cards-container { display: none; }

@media screen and (max-width: 1024px) {
    /* מסתירים את הטבלה המקורית (תמיכה כפולה) */
    .myTable.column-view, #myTable.column-view { display: none !important; }

    /* מציגים את מיכל הכרטיסים */
    #mobile-cards-container {
        display: block;
        padding: 10px;
    }

    .day-card {
        margin-bottom: 25px;
        border: 1px solid #d1e6f3;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .day-card-header {
        background-color: #054c78;
        color: white;
        padding: 12px;
        text-align: center;
        font-weight: bold;
        font-size: 1.2rem;
    }

    .day-card-row {
        display: flex;
        padding: 10px 15px;
        border-bottom: 1px solid #f0f4f8;
        align-items: center;
    }

    .day-card-row:last-child { border-bottom: none; }

    .day-card-label {
        /* הכותרת תופסת 35% מהרוחב */
        width: 35%; 
        
        font-weight: bold;
        color: #054c78;
        flex-shrink: 0;
        
        /* --------------------------------------------------
           ביטול החיתוך ואפשור גלישת שורה (מהתיקון הקודם)
           -------------------------------------------------- */
        white-space: normal; 
        overflow: visible; 
        line-height: 1.2; 
    }

    .day-card-value {
        flex-grow: 1;
        text-align: left; /* הערכים משמאל, הכותרת מימין */
    }

    .day-card-value img {
        max-width: 40px;
        height: auto;
    }
}

/* ==========================================================
   חלק 4: עיצוב זברה (חל על כל אלמנט עם Class זה)
   ========================================================== */

/* עיצוב זברה ספציפי לטבלאות עם Class zebra-table (ללא שינוי, תומך בכולם) */
.zebra-table tbody tr:nth-child(even) {
    background-color: #f4f8fb !important; /* תכלת פסטל עדין מאוד */
}

.zebra-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important; /* לבן לשורות האי-זוגיות */
}

/* אפקט Hover - מוסיף המון להנגשה (השורה נצבעת כשעוברים עליה) */
.zebra-table tbody tr:hover {
    background-color: #ebf3f9 !important;
    transition: background-color 0.2s ease;
}

/* התאמה למובייל - צובע את כל ה"כרטיס" של השורה השנייה */
@media screen and (max-width: 1024px) {
    .zebra-table tr:nth-child(even) {
        background-color: #f4f8fb !important;
        border: 1px solid #d1e6f3 !important;
    }
}