.title-placement {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%; /* ערך חדש: מאפשר בדיוק 4 שולחנות עם רווחים */
}
.container-placement {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  width: 100%; /* ערך חדש: מאפשר בדיוק 4 שולחנות עם רווחים */
}

.guest-area {
  min-width: 150px;
  max-height: 500px;
  overflow-y: auto;
  border: 2px dashed #aaa;
  padding: 15px;
  margin-right: 100px;
  background-color: #fff;
  border-radius: 8px;

}

.tables-area {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  flex: 1;
  max-width: 1250px; /* ערך חדש: מאפשר בדיוק 4 שולחנות עם רווחים */
  max-height: 700px; /* הגדר גובה מקסימלי לאזור השולחנות */
  overflow-y: auto; /* אפשרות גלילה למעלה ולמטה */
}

.table-placement {
  background-color:#f8bbd0;
  border: 2px solid #ccc;
  padding: 15px;
  border-radius: 10px;
  min-height: 120px;
  text-align: center;

  width: 240px;         /* רוחב קבוע */
  min-width: 240px;     /* מונע הקטנה */
  max-width: 240px;     /* מונע התרחבות */
  
}
.table-placement h3 {
  margin-top: 2px;  /* מקרב את הכותרת לגבול העליון של התיבה */
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.0;
}

.table-placement.over,
.guest-area.over {
  background-color: #e0f7fa;
  border-color: #00796b;
}

/* .guest {
  background-color: #e6f4ff;
  border: 1px solid #90caf9;
  padding: 5px 10px;
  margin: 5px 0;
  border-radius: 5px;
  cursor: grab;
  text-align: center;
} */

.guest {
  background-color: #e6f4ff;
  border: 1px solid #90caf9;
  padding: 12px 16px; /* הגדלת האזור שניתן לתפוס */
  margin: 8px 0;
  border-radius: 8px;
  cursor: grab;
  text-align: center;
  font-size: 16px;
  user-select: none;
  touch-action: none; /* חשוב למובייל */
}

.buttons {
  text-align: center;
  margin-top: 30px;
}

button {
  margin: 0 10px;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background-color: #0288d1;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background-color: #0277bd;
}

#results {
  margin-top: 40px;
  text-align: center;
}

.custom-img {
  width: 100%;
  height: 50vh;
  object-fit: contain;
  display: block;
  margin: 1rem auto;
}

.full-width-image {
  width: 100%;
  height: 50vh;
  object-fit: contain;
  display: block;
  padding: 10px;
}


@media (max-width: 768px) {
  .container-placement {
    flex-direction: column; /* מבנה חדש – השולחנות והאורחים יהיו אחד מעל השני */
    align-items: center; /* ממרכז את האלמנטים */
  }

  .tables {
    width: 100%; /* תופס 80% מהמרחב במובייל */
    margin-bottom: 20px; /* מוסיף רווח בין האורחים לשולחנות */
  }

  .guest {
    width: 80%; /* תופס 80% מהמרחב במובייל */
    margin-bottom: 20px; /* מוסיף רווח בין האורחים לשולחנות */
    font-size: 18px;
    padding: 16px 20px; /* גדול יותר במובייל */
  }

  .tables-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-height: 500px; /* הגדר גובה מקסימלי לאזור השולחנות */
  }

  .table-placement {
    width: 200px; /* שולחן לא יקטן פחות מ-180px */
    min-width: 200px;
  }
}