/* סגנונות כלליים */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  /* שחור עם 30% אטימות */
  z-index: -1;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  background-image: url('/includes/images/logo.png');
  /* הוסף את הנתיב לתמונת הרקע שלך כאן */
  background-size: cover;
  /* גורם לתמונה לכסות את כל הרקע */
  background-position: center;
  /* ממרכז את התמונה */
  background-repeat: no-repeat;
  /* מונע חזרה של התמונה */
  background-attachment: fixed;
  /* גורם לרקע להישאר קבוע בעת גלילה */
  margin: 0;
  padding-top: 20px;
  /* הוספת padding למרווח בחלק העליון של העמודה */
  padding-bottom: 80px;
  /* הוספת padding למרווח בחלק התחתון של העמודה, כדי להימנע מהתנגשות עם ה-footer */
}

h2,
h3,
h4 {
  text-align: center;
  color: #000000;
  padding: 10px 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin: 20px auto;
  /* שינוי מ-0 ל-auto בצדדים */
  width: fit-content;
  /* או max-width עם ערך ספציפי */
  background-color: rgba(255, 255, 255, 0.8);
  /* רקע לבן שקוף למחצה */
  border-radius: 5px;
  /* פינות מעוגלות */
}

/* סגנונות לפנייה נפתחת */
.referral-form {
  margin-top: 20px;
  width: 50%;
  /* רוחב הפורמה */
  margin: 0 auto;
  /* להוריד את המרווח בין הפורמה למרכז */
  padding: 20px;
  /* מרווח פנימי של הפורמה */
  background-color: rgba(249, 249, 249, 0.95);
  /* רקע כמעט אטום */
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.input-group {
  display: flex;
  justify-content: space-between;
}

.input-item {
  flex-grow: 1;
  margin-right: 10px;
}

.input-item:last-child {
  margin-right: 0;
}

.referral-form label {
  font-weight: bold;
  text-align: center;
  display: block;
  margin-bottom: 5px;
}

.update-separator {
  border: 0;
  height: 1px;
  background: #333;
  background-image: linear-gradient(to right, #ccc, #333, #ccc);
  margin: 10px 0;
}

.referral-form input[type="text"],
.referral-form input[type="date"],
.referral-form input[type="time"],
.referral-form input[type="email"],
.referral-form input[type="password"],
.referral-form input[type="checkbox"],
.referral-form input[type="checkbox"],
.referral-form input[type="file"],
.referral-form select,
.referral-form button,
.referral-form textarea {
  width: 100%;
  padding: 5px;
  margin: 10px 0;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  direction: rtl;
}

.referral-form select {
  appearance: none;
  -webkit-appearance: none;
  background: url('/includes/images/arrow-down.png') no-repeat left center;
  /* הגדרת מיקום התמונה */
  background-size: 20px;
  /* גודל התמונה */
  padding-right: 30px;
  /* כדי להניח את החץ מצד ימין */
}


.referral-form textarea {
  resize: vertical;
}

.referral-form input[type="submit"] {
  background-color: #4CAF50;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s;
  /* הוספת העברת צבע באנימציה */
}

.referral-form input[type="submit"]:hover {
  background-color: #45a049;
}

.referral-form input[type="button"] {
  background-color: #ff4d4d;
  /* צבע רקע */
  color: white;
  /* צבע טקסט */
  padding: 14px 20px;
  /* רווחים פנימיים */
  margin: 8px 0;
  /* רווחים חיצוניים */
  border: none;
  /* ללא מסגרת */
  border-radius: 4px;
  /* פינות מעוגלות */
  cursor: pointer;
  /* סמן העכבר */
  width: 100%;
  /* רוחב מלא */
  transition: background-color 0.3s;
  /* אנימציה */
}

.referral-form input[type="button"]:hover {
  background-color: #eb1616;
  /* צבע רקע ב-hover */
}

.required-field::after {
  content: " *";
  color: red;
}

.readonly-field {
  background-color: #f5f5f5;
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
}

.editable-field {
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.conflict-item {
  margin: 10px 0;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.error-message {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
}

.success-message {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
}

.extended-meeting-form {
  margin-top: 10px;
  padding: 15px;
  background-color: #f8f8f8;
  border-radius: 5px;
}

.extended-meeting-form .form-group {
  margin-bottom: 15px;
}

.extended-meeting-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #444;
}

.extended-meeting-form input[type="text"],
.extended-meeting-form input[type="time"],
.extended-meeting-form select {
  width: 200px;
  padding: 8px;
  margin-bottom: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.extended-meeting-form input[readonly] {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
}

.checkbox-container {
  margin: 10px 0;
}

.checkbox-container label {
  margin-right: 8px;
  color: #444;
}

.copy-times-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.copy-times-btn:hover {
  background-color: #45a049;
}

.center-input {
  text-align: center;
  /* ליצור מרכז לתוך התיבה */
  display: block;
  /* כדי שהרווחים שמאים מימין ומשמאל יהיו רק לפונקציות הקלט */
  margin: auto;
  /* כדי למרות כל הרווחים במרכז האופקי */
}

.availability-message {
  border-radius: 4px;
  margin: 10px 0;
  font-weight: bold;
}

#blue-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
}

.button-link {
  display: inline-block;
  background-color: #4CAF50;
  /* צבע רקע ירוק */
  color: white;
  /* צבע טקסט לבן */
  padding: 10px 20px;
  text-align: center;
  font-size: 16px;
  text-decoration: none;
  /* ללא קו תחתי */
  border-radius: 5px;
  /* פינות מעוגלות */
  cursor: pointer;
}

.button-link:hover {
  background-color: #45a049;
  /* צבע בעת מעבר עם העכבר */
}

#blue-button:hover {
  background-color: #0056b3;
}

#whatsapp-button {
  background-color: #007bff;
  /* צבע כחול */
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

#whatsapp-button:hover {
  background-color: #0056b3;
  /* צבע כחול כהה ב-HOVER */
}

#search_container {
  position: relative;
}

#search_results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

#search_results div {
  padding: 10px;
  cursor: pointer;
}

#search_results div:hover {
  background-color: #f0f0f0;
}

.notification-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  position: relative;
}

.notification-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 5px 10px;
  font-size: 14px;
}

.error-message {
  color: red;
  font-weight: bold;
  text-align: center;
  display: block;
  margin-bottom: 5px;
}

/* סגנונות טבלה */
.referral-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.9);
  /* רקע לבן עם שקיפות קלה */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  /* צל קל לשיפור הנראות */
}

.referral-table thead th {
  background-color: #f2f2f2;
}

.referral-table th,
.referral-table td {
  border: 1px solid black;
  padding: 8px;
  text-align: center;
}

.referral-table th {
  font-weight: bold;
}

.referral-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.referral-table tbody tr:hover {
  background-color: #ddd;
}

.referral-table button {
  padding: 8px;
  text-align: center;
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
}

.referral-table button:hover {
  background-color: #45a049;
}

/* עיצוב תפריט */
#menu {
  background: rgba(0, 0, 0, 0.8);
  /* רקע שחור עם שקיפות */
  height: 45px;
  border-radius: 10px;
}

#menu ul,
#menu li {
  margin: 0 auto;
  padding: 0;
  list-style: none
}

#menu ul {
  width: 100%;
  text-align: center;
}

#menu li {
  display: inline-block;
  position: relative;
}

#menu a {
  display: block;
  line-height: 45px;
  padding: 0 14px;
  text-decoration: none;
  color: #FFFFFF;
  font-size: 16px;
  text-transform: capitalize;
}

#menu a.dropdown-arrow:after {
  content: "\25BE";
  margin-left: 5px;
}

#menu li a:hover {
  color: #FFA500;
  background: #000000;
}

#menu input {
  display: none;
  margin: 0;
  padding: 0;
  height: 45px;
  width: 100%;
  opacity: 0;
  cursor: pointer
}

#menu label {
  display: none;
  line-height: 45px;
  text-align: center;
  position: absolute;
  left: 35px
}

#menu label:before {
  font-size: 1.6em;
  color: #FFFFFF;
  content: "\2261";
  margin-left: 20px;
}

#menu ul.sub-menus {
  height: auto;
  overflow: hidden;
  width: 170px;
  background: #444444;
  position: absolute;
  z-index: 99;
  display: none;
}

#menu ul.sub-menus li {
  display: block;
  text-align: center;
  width: 100%;
}

#menu ul.sub-menus a {
  color: #FFFFFF;
  font-size: 16px;
}

#menu li:hover ul.sub-menus {
  display: block;
}

#menu ul.sub-menus a:hover {
  background: #F2F2F2;
  color: #444444;
}

/* עיצוב לוח השנה */
#calendar {
  max-width: 800px;
  /* הגבלת הרוחב המרבי של לוח השנה */
  margin: 0 auto;
  /* מרכוז לוח השנה באמצעות שימוש במרווחים אוטומטיים מסביב */
  padding: 20px;
  /* מרווח בתוך לוח השנה */
  border: 1px solid #ccc;
  /* גבול סביב לוח השנה */
  border-radius: 10px;
  /* עיגול קצוות של לוח השנה */
  direction: ltr;
  /* כיוון הטקסט של לוח השנה משמאל לימין */
  background-color: rgba(255, 255, 255, 0.95);
  /* רקע לבן כמעט אטום */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* עיצוב אירוע בלוח השנה */
.fc-event {
  padding: 10px;
  /* מרווח בתוך אירוע */
  margin-bottom: 10px;
  /* מרווח בין אירועים */
  border-radius: 5px;
  /* עיגול קצוות של אירוע */
  background-color: #f9f9f9;
  /* צבע רקע של אירוע */
  cursor: pointer;
  /* סמל עכבר כאשר מעבירים מעל האירוע */
  text-align: right;
  /* כיוון הטקסט של אירוע מימין לשמאל */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* אפקט צללית קלה לאירוע */
}

/* עיצוב השעה באירוע */
.fc-time {
  margin-left: 10px;
  /* מרווח משמאל לשעה */
}

/* עיצוב הכותרת באירוע */
.fc-title {
  white-space: pre-wrap;
  /* פריסת שורות בהתאמה לתוכן */
  line-height: 1.5em;
  /* גובה השורה */
  direction: rtl;
  /* מימין לשמאל */
  text-align: right;
}

.fc-employee {
  font-size: 0.8em;
  color: #ffffff;
  margin-top: 2px;
  line-height: 1.2em;
  /* התאמה לגובה השורות */
  font-weight: bold;
  /* להבליט את הטקסט */
  direction: rtl;
  /* מימין לשמאל */
  text-align: right;
  /* יישור לימין */
}

.edit-event {
  background-color: #007bff;
  /* צבע רקע */
  color: white;
  /* צבע טקסט */
  padding: 10px 20px;
  /* רווחים פנימיים */
  border: none;
  /* ללא גבול */
  border-radius: 4px;
  /* פינות מעוגלות */
  cursor: pointer;
  /* סמן העכבר */
  font-size: 16px;
  /* גודל פונט */
  transition: background-color 0.3s;
  /* אנימציה */
}

.edit-event:hover {
  background-color: #0056b3;
  /* צבע רקע ב-hover */
}

/* עיצוב הפוטר */
footer {
  position: fixed;
  /* קביעת המיקום של הפוטר */
  bottom: 0;
  /* מרווח מהתחתית של הדף */
  left: 0;
  /* מרווח מהשמאל של הדף */
  right: 0;
  /* מרווח מהימין של הדף */
  text-align: center;
  /* מירכוז התוכן במרכז */
  padding: 10px;
  /* מרווח בתוך הפוטר */
  background-color: rgba(242, 242, 242, 0.9);
  /* רקע בהיר עם שקיפות קלה */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  border-top: 1px solid #dddddd;
  /* גבול עליון של הפוטר */
}

/* עיצוב טקסט בתוך הפוטר */
footer p {
  margin: 0;
  /* מרווח בסביבת הטקסט */
  color: #333333;
  /* צבע הטקסט */
}

.pagination {
  text-align: center;
  margin: 20px 0;
}

.pagination button {
  margin: 0 5px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 5px;
  text-decoration: none;
  color: #fff;
  background-color: #007bff;
  border: 1px solid #007bff;
  border-radius: 5px;
  transition: background-color 0.3s, border-color 0.3s;
}

.pagination a:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.pagination span {
  background-color: #6c757d;
  border-color: #6c757d;
}

.filter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-container input,
.filter-container select,
.filter-container button {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(204, 204, 204, 0.8);
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.filter-container button {
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.filter-container button:hover {
  background-color: #45a049;
}

.eligibility-container {
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid;
  font-weight: bold;
}

.eligibility-checking {
  background-color: #f5f5f5;
  border-color: #ddd;
  color: #666;
}

.eligibility-approved {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.eligibility-warning {
  background-color: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.eligibility-denied {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.override-button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: bold;
}

.override-button:hover {
  background-color: #5a6268;
}

.eligibility-loading {
  display: inline-block;
  margin-right: 10px;
}

/* Media Queries */

/* עבור מכשירים קטנים במיוחד (מסכים קטנים מ-600 פיקסלים) */
@media (max-width: 600px) {
  .referral-form {
    width: 90%;
  }

  .input-group {
    flex-direction: column;
  }

  .input-item {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .input-item:last-child {
    margin-bottom: 0;
  }

  #menu {
    position: relative
  }

  #menu ul {
    background: #444444;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 3;
    height: auto;
    display: none;
    text-align: left;
  }

  #menu ul.sub-menus {
    width: 100%;
    position: static;
  }

  #menu ul.sub-menus a {
    padding-left: 30px;
  }

  #menu li {
    display: block;
    float: none;
    width: auto;
  }

  #menu input,
  #menu label {
    position: absolute;
    top: 0;
    left: 0;
    display: block
  }

  #menu input {
    z-index: 4
  }

  #menu input:checked+label {
    color: #FFFFFF
  }

  #menu input:checked+label:before {
    content: "\00d7"
  }

  #menu input:checked~ul {
    display: block
  }

  #calendar {
    padding: 10px;
  }

  footer {
    padding: 5px;
  }

  /* התאמת הכפתורים */
  .referral-form input[type="submit"],
  .referral-form input[type="button"],
  #blue-button,
  #whatsapp-button,
  .referral-table button,
  .edit-event,
  .pagination a,
  .pagination span {
    font-size: 14px;
    /* הקטנת גודל הטקסט */
    padding: 10px;
    /* צמצום המרווחים הפנימיים */
    margin: 5px 0;
    /* הקטנת המרווח החיצוני */
  }

  .referral-form input[type="submit"],
  .referral-form input[type="button"],
  #blue-button,
  #whatsapp-button {
    width: 100%;
    /* הבטחת רוחב מלא */
  }

  /* התאמת הטבלה */
  .referral-table {
    width: 100%;
    /* הבטחת ניצול מלא של רוחב המסך */
    font-size: 12px;
    /* הקטנת גודל הטקסט בטבלה */
  }

  .referral-table th,
  .referral-table td {
    padding: 4px;
    /* הקטנת המרווחים הפנימיים בתאים */
  }

  .referral-table th {
    font-size: 13px;
    /* גודל טקסט קטן בכותרות הטבלה */
  }

  .referral-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
    /* גוון קל על כל שורה זוגית */
  }

  .referral-table tbody tr:hover {
    background-color: #e0e0e0;
    /* שינוי צבע הרקע של השורה בהעברת העכבר */
  }

  /* אפשרות לגלילה אופקית */
  .referral-table-container {
    overflow-x: auto;
    /* הוספת גלילה אופקית במידת הצורך */
    -webkit-overflow-scrolling: touch;
    /* גלילה חלקה בטלפונים ניידים */
  }
}

/* עבור טאבלטים ומסכים בגודל בינוני (600-992 פיקסלים) */
@media (min-width: 601px) and (max-width: 992px) {
  .referral-form {
    width: 70%;
  }

  #menu {
    position: relative
  }

  #menu ul {
    background: #444444;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 3;
    height: auto;
    display: none;
    text-align: left;
  }

  #menu ul.sub-menus {
    width: 100%;
    position: static;
  }

  #menu ul.sub-menus a {
    padding-left: 30px;
  }

  #menu li {
    display: block;
    float: none;
    width: auto;
  }

  #menu input,
  #menu label {
    position: absolute;
    top: 0;
    left: 0;
    display: block
  }

  #menu input {
    z-index: 4
  }

  #menu input:checked+label {
    color: #FFFFFF
  }

  #menu input:checked+label:before {
    content: "\00d7"
  }

  #menu input:checked~ul {
    display: block
  }

  #calendar {
    max-width: 100%;
  }

  /* התאמת הכפתורים */
  .referral-form input[type="submit"],
  .referral-form input[type="button"],
  #blue-button,
  #whatsapp-button,
  .referral-table button,
  .edit-event,
  .pagination a,
  .pagination span {
    font-size: 16px;
    padding: 12px;
    margin: 10px 0;
  }

  .referral-form input[type="submit"],
  .referral-form input[type="button"],
  #blue-button,
  #whatsapp-button {
    width: auto;
  }

  /* התאמת הטבלה */
  .referral-table {
    width: 100%;
    /* הבטחת ניצול מלא של רוחב המסך */
    font-size: 14px;
    /* הקטנת גודל הטקסט בטבלה */
  }

  .referral-table th,
  .referral-table td {
    padding: 6px;
    /* הקטנת המרווחים הפנימיים בתאים */
  }

  .referral-table th {
    font-size: 15px;
    /* גודל טקסט בינוני בכותרות הטבלה */
  }

  .referral-table tbody tr:nth-child(even) {
    background-color: #f7f7f7;
    /* צל קל על כל שורה זוגית */
  }

  .referral-table tbody tr:hover {
    background-color: #e2e2e2;
    /* שינוי צבע הרקע של השורה בהעברת העכבר */
  }

  /* אפשרות לגלילה אופקית */
  .referral-table-container {
    overflow-x: auto;
    /* הוספת גלילה אופקית במידת הצורך */
  }
}