/* Maps Quiz Styles - Fixed Layout */

.quiz-header {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.quiz-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.quiz-header .subtitle {
  font-size: 1.1rem;
  color: #555;
}

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
}

/*map container*/

.map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  background: transparent;
  border-radius: 8px;
  padding: 20px;
  min-height: 280px;
  overflow: hidden;
}

#map-display {
  width: 100%;
  max-width: 400px;
  height: auto; /* ✅ allow content to determine height */
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 600px) {
  .map-container {
    max-height: 260px;
    padding: 0;
    overflow: hidden;
  }

  #map-display svg {
    max-height: 220px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }
}

/*country map*/
.country-map {
  max-width: 100%;
  height: auto; /* ✅ allow full height of tall maps */
  display: block;
  margin: 0 auto;
  background: transparent;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.4));
}

svg.country-map path,
svg.country-map polygon,
svg.country-map rect {
  fill: #000 !important;
  stroke: #000 !important;
  stroke-width: 1px !important;
}

.guess-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0;
}

.mcq-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 18px auto;
  transition: opacity 0.2s ease-in-out;
}

.mcq-btn {
  padding: 14px;
  font-size: 1.1em;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.mcq-btn:hover {
  background: #000;
}

.mcq-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


.mcq-correct {
  background: #3bbf3b !important;
  color: #fff !important;
  border: 2px solid #278b27 !important;
  animation: correctPulse 0.6s ease-in-out;
}

.mcq-wrong {
  background: #e74c3c !important;
  color: #fff !important;
  border: 2px solid #a72b1a !important;
  animation: wrongShake 0.4s ease-in-out;
}

@keyframes correctPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(46, 125, 50, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 18px rgba(46, 125, 50, 0.25); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(46, 125, 50, 0.4); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

#feedback-container {
  margin: 20px 0;
  text-align: center;
}

.primary-button,
.secondary-button {
  padding: 12px 20px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  width: 100%;
  max-width: 220px;
  margin: 10px auto;
  display: block;
}

.primary-button:hover,
.secondary-button:hover {
  background: #000;
}


/* Results Container */
#results-container {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

@media (max-width: 768px) {
  .map-container {
    padding: 10px;
  }

  .mcq-buttons {
    flex-direction: column;
  }
}

/* Fact Box Visibility */
#map-fact {
  margin-top: 24px;
  font-size: 1rem;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: block;
}

/* Hide when class="hidden" is applied */
#map-fact.hidden {
  display: none;
}

/* Smooth fade-out when removing answer buttons */
.mcq-buttons.removing {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}


.quiz-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.control-button {
  background-color: #6f7173; /* Blue that contrasts but feels clean */
  color: #fff;
  padding: 10px 20px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease;
}

.control-button:hover {
  background-color: #636567;
}

@media (max-width: 500px) {
  .quiz-controls {
    flex-direction: column;
    align-items: center;
  }

  .control-button {
    width: 80%;
  }
}

#hint-text {
  text-align: center;
  font-size: 20px;
  color: #333;
  margin-top: 20px;
  margin-bottom: 20px;
  font-family: 'Tajawal', sans-serif;
}

