/* style.css */

/* Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* גוף הדף */
body {
  font-family: Arial, sans-serif;
  background-color: #90A69F; /* צבע רקע הדף */
  color: #727D52;           /* צבע טקסט ברירת מחדל */
  text-align: center;
  direction: rtl;

  /* מוסיפים רווח למעלה ולמטה כדי לא להסתיר תוכן מתחת לכותרת והפוטר המקובעים */
  padding-top: 160px; /* adjust this to match header height */
  padding-bottom: 60px; /* adjust if you have a tall footer */
}

/* כותרת עליונה מקובעת */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #90A69F;
  color: #727D52;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  padding: 10px 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* ערימה אנכית של לוגו, h1, h2 */
  align-items: center;    /* ממורכז אופקית */
  justify-content: center;
  gap: 10px;
  height: 160px; /* אם ברצונך גובה ידוע, הוסף px ו ; */
}

.logo {
  width: 150px; /* Adjust as needed */
  height: auto;
}

/* כותרת וטקסט בכותרת העליונה */
.header-content h1 {
  font-size: 2rem;
  margin: 0.5rem 0;
}
.header-content h2 {
  font-size: 1.5rem;
  margin: 0.2rem 0;
}

/* כותרת תחתונה מקובעת */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #90A69F;
  color: #727D52;
  padding: 10px 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: center;
  font-size: 1rem; /* ניתן לשנות לפי הצורך */
}

/* תוכן מרכזי */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* גלריה */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 עמודות ברירת מחדל */
  gap: 1rem;
  margin: 1rem 0;
}

/* במסכים רחבים (1024px ומעלה) 4 עמודות */
@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* כרטיס גזע */
.breed-card {
  width: 100%; /* מנצל את כל התא ברשת */
  cursor: pointer;
  border: 4px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  transition: transform 0.2s, border-color 0.2s;
}

.breed-card img {
  max-width: 100%;
  max-height: 75%;
  border-radius: 8px;
}

.breed-card p {
  margin: 1rem 0;
}

.traits {
  font-size: 1.2rem;
  color: #727D52;
}

.breed-card.selected {
  border-color: #28a745;
  transform: scale(1.05);
}

/* כפתורים כלליים */
button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  margin: 1rem;
  border: none;
  border-radius: 8px;
  background-color: #F0941D; /* צבע רקע ברירת מחדל לכפתורים */
  color: #fff;
  cursor: pointer;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* אזור תוצאות */
.result-section {
  margin: 1rem 0;
  padding: 1rem;
}

/* תמונות הגזעים הנבחרים זו לצד זו */
.chosen-breeds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.chosen-breeds img {
  width: 400px; /* adjust as needed */
  border: 2px solid #ccc;
  border-radius: 8px;
  display: block;
}

/* תמונה שנוצרת ע"י ה-AI */
.generated-image img {
  width: 1024px;
  margin-top: 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* כפתור צף לערבוב גזעים */
#mixButton {
  position: fixed;
  bottom: 20px;
  left: 40px; /* לצד RTL */
  z-index: 1001;
  padding: 0.75rem 1.5rem;
  font-size: 2rem;
  border: none;
  border-radius: 50px;
  background-color: #F0941D;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background-color 0.2s;
}

#mixButton:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#mixButton:hover:not(:disabled) {
  background-color: #727D52;
}

/* Spinner / Loading Indicator (paw-spinner) */
.loading {
  margin: 1rem auto;
  text-align: center;
}

.paw-spinner {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 1rem auto;
  animation: spin 3s linear infinite;
}

.paw {
  position: absolute;
  font-size: 24px;
}

/* סידור 4 עקבות בכל 25% */
.paw:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.paw:nth-child(2) {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}
.paw:nth-child(3) {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.paw:nth-child(4) {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* מקטינים במסכים קטנים */
@media (max-width: 768px) {
  .breed-card {
    width: 80%;
  }
  .chosen-breeds img {
    width: 80%;
  }
  .generated-image img {
    width: 90%;
  }
  .header-content h1 {
    font-size: 1.6rem;
  }
  .header-content h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .breed-card {
    width: 90%;
  }
  .header-content h1 {
    font-size: 1.4rem;
  }
  .header-content h2 {
    font-size: 1.1rem;
  }
  #mixButton {
    bottom: 10px;
    left: 10px;
  }
}

/* אזור העלאת גזעים (לממשק Admin) */
.upload-section {
  margin: 2rem 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.upload-section h2 {
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
  text-align: right;
}

.form-group label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.upload-btn {
  background-color: #F0941D;
}
.upload-btn:hover {
  background-color: #727D52;
}

/* מחיקת גזע בממשק Admin */
.breed-item {
  border: 1px solid #ccc;
  padding: 10px;
  margin: 10px;
  text-align: center;
  display: inline-block;
  vertical-align: top;
}

.delete-btn {
  padding: 0.5rem 1rem;
  background-color: #dc3545;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}
.delete-btn:hover {
  background-color: #c82333;
}

/* מודל מותאם אישית (אישור מחיקה / מידע עסקי) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #727D52;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  color: #F0941D;
}

/* כפתור סגירה למודל */
.close-btn {
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.close-btn:hover {
  background-color: #218838;
}

/* מודל עם כפתורי אישור וביטול (אישור מחיקה) */
.modal-buttons {
  margin-top: 1rem;
}

.modal-buttons button {
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.confirm-btn {
  background-color: #28a745;
  color: #fff;
}
.confirm-btn:hover {
  background-color: #218838;
}

.cancel-btn {
  background-color: #dc3545;
  color: #fff;
}
.cancel-btn:hover {
  background-color: #c82333;
}

