/* 🕹️ toring-test.css - Stylesheet for the Toring Test feature. */

.toring-link {
  font-size: 3rem;
  color: rgb(83.1% 68.6% 21.6%);
  cursor: pointer;
  text-decoration: underline;
  font-family: Righteous, sans-serif;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgb(83.1% 68.6% 21.6% / 30%);
  display: block;
  margin: 0 auto;
  text-align: center;
}

.toring-link:hover {
  color: rgb(100% 84.3% 0%);
  transform: scale(1.05);
  text-shadow: 0 0 15px rgb(100% 84.3% 0% / 60%);
  text-decoration: underline;
}

.toring-link:focus {
  outline: 2px solid rgb(83.1% 68.6% 21.6%);
  outline-offset: 4px;
  color: rgb(100% 84.3% 0%);
  text-shadow: 0 0 15px rgb(100% 84.3% 0% / 60%);
}

.toring-link:active {
  transform: scale(0.98);
  color: rgb(72.2% 58.0% 12.2%);
}

.overlay-base,
.modal,
.popup {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0% 0% 0% / 50%);
  justify-content: center;
  align-items: center;
}

.content-base,
.modal-content,
.popup-content {
  background-color: rgb(100% 100% 100%);
  color: var(--primary-color);
  border-radius: 10px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  max-width: 90%;
}

.modal {
  display: none;
  z-index: 1000;
}

.modal-content {
  padding: 20px;
  width: 400px;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.grid-item {
  width: 100px;
  height: 100px;
  position: relative;
  cursor: pointer;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.grid-item.selected {
  pointer-events: none;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 5px;
}

.overlay.checkmark,
.overlay.cross {
  color: rgb(100% 100% 100%);
}

.overlay.checkmark {
  background-color: rgb(29.8% 68.6% 31.4% / 80%);
}

.overlay.cross {
  background-color: rgb(95.7% 26.3% 21.2% / 80%);
}

.popup {
  z-index: 1001;
}

.popup-content {
  padding: 10px;
  width: 400px;
}

.popup-content h2 {
  color: rgb(29.8% 68.6% 31.4%);
  margin-bottom: 15px;
}

.popup-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.popup-content button {
  background-color: rgb(83.1% 68.6% 21.6%);
  color: rgb(100% 100% 100%);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.popup-content button:hover {
  background-color: rgb(72.2% 58.0% 12.2%);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
}

/* Mobile-specific enhancements */
@media (width <= 768px) {
  .toring-link {
    font-size: 2.5rem;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 20px;
    background: linear-gradient(135deg, rgb(83.1% 68.6% 21.6% / 10%) 0%, rgb(100% 84.3% 0% / 10%) 100%);
    border: 2px solid rgb(83.1% 68.6% 21.6% / 30%);
    animation: subtle-pulse 3s ease-in-out infinite;
    min-height: 44px; /* Apple's recommended minimum touch target */
    display: block;
    text-align: center;
  }
  
  .toring-link:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, rgb(83.1% 68.6% 21.6% / 20%) 0%, rgb(100% 84.3% 0% / 20%) 100%);
    border-color: rgb(83.1% 68.6% 21.6% / 50%);
  }
}

@keyframes subtle-pulse {
  0%, 100% {
    text-shadow: 0 0 10px rgb(83.1% 68.6% 21.6% / 30%);
    border-color: rgb(83.1% 68.6% 21.6% / 30%);
  }

  50% {
    text-shadow: 0 0 15px rgb(83.1% 68.6% 21.6% / 50%);
    border-color: rgb(83.1% 68.6% 21.6% / 40%);
  }
}
