﻿/* עיצוב כללי של העמוד */
body { 
    font-family: Arial, sans-serif; 
    margin: 20px; 
    background-color: #f4f6f9; 
    color: #333; 
    direction: rtl; 
}

/* מסגרת המחשבון הלבנה */
.container { 
    max-width: 600px; 
    margin: 0 auto; 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

/* כותרות */
h2 { 
    text-align: center; 
    color: #2c3e50; 
    margin-bottom: 20px; 
}

h3 { 
    color: #2c3e50; 
    margin-top: 30px; 
    margin-bottom: 10px; 
    border-bottom: 2px solid #3498db; 
    padding-bottom: 5px; 
}

/* אזור שדות הקלט */
.input-group { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px; 
}

.input-field { 
    flex: 1; 
    margin: 0 5px; 
}

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
}

input[type="time"] { 
    width: 100%; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
}

/* כפתורים */
.btn-calc { 
    width: 100%; 
    padding: 10px; 
    background-color: #3498db; 
    color: white; 
    border: none; 
    border-radius: 4px; 
    font-size: 16px; 
    cursor: pointer; 
    margin-bottom: 10px; 
    font-weight: bold; 
}

.btn-calc:hover { 
    background-color: #2980b9; 
}

.btn-geo { 
    width: 100%; 
    padding: 10px; 
    background-color: #e67e22; 
    color: white; 
    border: none; 
    border-radius: 4px; 
    font-size: 15px; 
    cursor: pointer; 
    font-weight: bold; 
    margin-bottom: 15px; 
}

.btn-geo:hover { 
    background-color: #d35400; 
}

/* תיבות מידע וסטטוס */
.result-box { 
    margin-top: 20px; 
    font-weight: bold; 
    text-align: center; 
    background: #e8f4fd; 
    padding: 10px; 
    border-radius: 4px; 
}

.geo-box { 
    margin-top: 10px; 
    font-size: 13px; 
    text-align: center; 
    color: #7f8c8d; 
    font-weight: bold; 
}

/* טבלאות */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 10px; 
}

th, td { 
    border: 1px solid #ddd; 
    padding: 10px; 
    text-align: center; 
}

th { 
    background-color: #2c3e50; 
    color: white; 
}

tr:nth-child(even) { 
    background-color: #f9f9f9; 
}

/* עיצוב שורות מיוחדות */
.highlight { 
    background-color: #fff3cd !important; 
    font-weight: bold; 
}

.info-row { 
    background-color: #eaeded !important; 
    font-size: 14px; 
    color: #2c3e50; 
}

.halacha-table th { 
    background-color: #27ae60;
}

/* עיצוב טבלת התיאורים העליונה */
.descriptions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: -5px;
    margin-bottom: 15px;
    background: transparent;
}

.descriptions-table td {
    width: 50%;
    border: none !important;
    text-align: right;
    vertical-align: top;
    padding: 5px 12px;
    font-size: 13px;
    color: #566573;
    line-height: 1.5;
}

.descriptions-table td strong {
    color: #2c3e50;
    font-size: 14px;
    display: block;
    margin-bottom: 3px;
}
/* יישור ואחידות רוחב העמודות בשתי הטבלאות */
/* table th:first-child, table td:first-child {
    width: 10%; /* עמודת המספר תתפוס תמיד 10% מרוחב המסך */
/*}

table th:last-child, table td:last-child {
    width: 25%; /* עמודת השעה תתפוס תמיד 25% מרוחב המסך */
/*}
/* אפקט ריחוף בצבע כחלחל-בהיר שונה לחלוטין מצבעי הטבלה */
table tbody tr:hover {
    background-color: #ebf5fb !important; /* גוון כחלחל עדין, נקי ומזמין */
}
/* עיצוב כפתור ההדפסה - ממורכז ובצבע בורדו יוקרתי */
.btn-print {
    display: block;
    width: 220px;
    margin: 25px auto 0; /* הגדלתי מעט את הריווח העליון מהטבלה הירוקה */
    padding: 10px 20px;
    background-color: #7b241c; /* גוון בורדו-יין עמוק, שונה לחלוטין מהירוק */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: background 0.2s; /* אפקט מעבר חלק בריחוף */
}
.btn-print:hover {
    background-color: #641e16; /* בורדו מעט כהה יותר בזמן ריחוף */
}

/* העלמת אלמנט שעות ההדפסה במסך רגיל */
.print-sun-times {
    display: none;
}

/* חוקי הדפסה - מעלים רכיבים מיותרים מהדף המודפס */
/* העלמת אלמנט שעות ההדפסה במסך רגיל */
.print-sun-times {
    display: none;
}

/* עיצוב כותרת התאריכים ופרשת השבוע */
.date-header {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    padding: 8px 12px;
    background-color: #eef2f7;
    border-radius: 6px;
    border: 1px solid #d5dbdb;
}

/* חוקי הדפסה - מעלים רכיבים מיותרים מהדף המודפס */
@media print {
    body { background: white; margin: 0; padding: 0; }
    .container { box-shadow: none; max-width: 100%; padding: 0; }
    .btn-geo, .input-group, .btn-calc, .btn-print, .geo-box, #methodSection, .alarm-wrapper { 
        display: none !important; /* מעלים כפתורים, תיבות קלט ואת השעון המעורר בהדפסה */
    }
    
    /* הצגת שעות הזריחה והשקיעה בשני מלבנים מיושרים מעל העמודות */
    .print-sun-times {
        display: flex !important;
        justify-content: space-between;
        margin: 15px 0 5px 0;
    }

    .print-sun-item {
        width: 48%; /* תואם בדיוק לרוחב העמודות בטבלת התיאורים */
        text-align: right;
        padding: 8px 12px;
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        box-sizing: border-box;
        font-size: 15px;
    }
    /* 💥 דחיפת הטבלה השנייה והכותרת שלה לראש עמוד 2 בצורה נקייה */
    #table1Section {
        page-break-before: always;
        break-before: page;
    }
    table { page-break-inside: avoid; }
}

/* עיצוב האקורדיון בתוך הטבלה */
.accordion-td {
    text-align: right !important;
    padding: 0 !important; /* מאפשר ללחיצה לתפוס את כל שטח התא */
}

details {
    width: 100%;
}

/* כותרת האקורדיון שעליה לוחצים */
summary {
    padding: 10px 12px;
    cursor: pointer;
    list-style: none; /* מעלים את החץ המובנה בדפדפנים מודרניים */
    display: flex;
    justify-content: space-between; /* דוחף את החץ המעוצב לשמאל התא */
    align-items: center;
    outline: none;
}

/* מעלים את החץ המובנה בדפדפני ספארי / אפל */
summary::-webkit-details-marker {
    display: none;
}

/* החץ המעוצב שלנו */
.arrow-icon {
    font-size: 10px;
    color: #7f8c8d;
    transition: transform 0.2s ease; /* אפקט סיבוב חלק */
}

/* כשהאקורדיון פתוח - סובב את החץ כלפי מעלה */
details[open] .arrow-icon {
    transform: rotate(180deg);
    color: #3498db; /* הפיכת החץ לכחול כשהוא פתוח */
}

/* אזור התוכן המוסתר שנפתח */
.accordion-content {
    background-color: #f8f9f9; /* רקע אפרפר בהיר שמבדל את המצוות מהטבלה */
    padding: 10px 15px;
    border-top: 1px dashed #ddd;
    text-align: right;
}

.accordion-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-content li {
    font-size: 13px;
    color: #5d6d7e;
    line-height: 1.6;
    margin-bottom: 5px;
}

.accordion-content li:last-child {
    margin-bottom: 0;
}
/* יישור גורף של כל עמודת התיאורים/שמות בטבלאות לימין */
table td:nth-child(2) {
    text-align: right !important;
}
/* הוספת חץ קטן ליד שמות השעות הזמניות שה-JS מייצר */
.zmanit-table tbody tr td:nth-child(2)::after {
    content: " ▼";
    font-size: 10px;
    color: #7f8c8d;
    margin-right: 5px;
    display: inline-block;
}

/* החרגת שורות המידע המיוחדות (הנץ והשקיעה) שלא יקבלו חץ */
.zmanit-table tbody tr.info-row td:nth-child(2)::after {
    content: "" !important;
}

/* הפיכת שורת השעה ללחיצה */
.zmanit-table tbody tr td:nth-child(2) {
    cursor: pointer;
}
/* סיבוב חלק של החץ בטבלת השעות הזמניות כשהשורה פתוחה */
.zmanit-table tbody tr.row-open td:nth-child(2)::after {
    content: " ▲" !important;
    color: #3498db; /* הופך את החץ לכחול כשהשורה פתוחה */
}
/* העלמת החץ הכפול מתוך שורת הפירוט הנפתחת */
.zmanit-table tbody tr.dynamic-desc-row td::after {
    content: "" !important;
}
/* העלמת החץ וסימן היד משעות שאין בהן מלל */
.zmanit-table tbody tr.no-details td:nth-child(2)::after {
    content: "" !important;
}
.zmanit-table tbody tr.no-details td:nth-child(2) {
    cursor: default !important; /* מחזיר סמן עכבר רגיל במקום יד של לחיצה */
}
