/* website/static/css/tags.css */

/* 🌐 Global Background (favicon.png over solid black) */
body {
  background-color: #000; /* solid black fallback */
  background-image: url("/static/img/favicon.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
  color: #ffa07a; /* orange text globally */
  margin: 0;
  padding: 0;
}

/* 🔹 Shared Frosted-Glass Card Style */
.tag-box,
button.mother-btn,
button.sub-btn,
.tag-card,
.grandchild-list li,
.read-all-btn,
.tag-input {
  background: rgba(26, 26, 26, 0.5); /* translucent dark overlay */
  backdrop-filter: blur(12px);       /* crystal blur effect */
  border: 3px solid #ffa07a;         /* orange border */
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* 🔹 Question count box: hidden until JS activates it */
.question-count {
  display: none; /* hidden initially */
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(12px);
  border: 3px solid #ffa07a;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.question-count.active {
  display: block; /* shown when JS adds .active */
}

/* 🔸 Subcategory Navigation */
.subcategory-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* 🟧 Mother Tag Cards */
button.mother-btn {
  flex: 1 1 calc(45% - 20px); /* two per row */
  max-width: 300px;
  min-width: 220px;
  margin: 10px;
  padding: 30px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffa07a;
  text-align: center;
  cursor: pointer;
}
button.mother-btn:hover {
  transform: scale(1.03);
  border-color: #ff9800;
}

/* 🟨 Child Tag Cards */
button.sub-btn {
  flex: 1 1 calc(45% - 20px); /* two per row */
  max-width: 260px;
  min-width: 200px;
  margin: 10px;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #ffa07a;
  text-align: center;
  cursor: pointer;
}
button.sub-btn:hover {
  transform: scale(1.02);
  border-color: #ff9800;
  background: rgba(255, 152, 0, 0.6);
  color: #000;
}

/* 📌 Breadcrumb Trail */
.tag-ancestry {
  margin: 16px 0;
  font-size: 1rem;
  color: #ffa07a;
  text-align: center;
}
.tag-ancestry span {
  font-weight: bold;
}
.tag-ancestry span::after {
  content: " » ";
  color: #ff9800;
}
.tag-ancestry span:last-child::after {
  content: "";
}

/* 🃏 Animated Tag Cards */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 24px;
}
.tag-card {
  flex: 1 1 calc(45% - 20px); /* two per row */
  max-width: 240px;
  min-width: 200px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
}
.tag-card:hover {
  transform: scale(1.05);
  border-color: #ff9800;
}
.tag-card img.organ-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* 🌱 Grandchild Tag List */
.grandchild-list {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.grandchild-list li {
  flex: 1 1 calc(45% - 20px); /* two per row */
  max-width: 220px;
  min-width: 180px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: bold;
  color: #ffa07a;
  cursor: pointer;
}
.grandchild-list li:hover {
  background: rgba(255, 152, 0, 0.6);
  color: #000;
}

/* 📊 Question Count Box */
.question-count {
  padding: 12px 18px;
  margin-bottom: 16px;
  font-weight: bold;
  text-align: center;
  color: #ffa07a;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* 📖 Read All Button */
.read-all-btn {
  display: block;
  width: fit-content;
  margin: 20px auto;
  padding: 14px 20px;
  font-weight: bold;
  color: #ffa07a;
  cursor: pointer;
}
.read-all-btn:hover {
  background: rgba(255, 152, 0, 0.6);
  color: #000;
}

/* ✏️ Tag Input */
.tag-input {
  width: 80px;
  margin: 12px auto;
  padding: 8px;
  text-align: center;
  color: #ffa07a;
}

/* 📱 Responsive: stack cards on narrow screens */
@media (max-width: 600px) {
  button.mother-btn,
  button.sub-btn,
  .tag-card,
  .grandchild-list li {
    flex: 1 1 100%;
    max-width: none;
  }
}