/* MAP CONTAINER - Full width, no right margin */
.container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 88vh;
    margin: 0 auto 20px auto;
    overflow: hidden;
    background: #74e0d2;
}

/* TOP BAR - Quiz/Score/Timer */
#quizArea {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    z-index: 1001;
    border-bottom: 3px solid #3498db;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;          /* keep panel centered */
    max-width: 1000px;
    margin: 0 auto 10px auto;
}

/* First line: Q1 + text + correctAnswer as a single centered block */
#quizArea > div:first-child {
    text-align: center;          /* this entire line centered */
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Q1 is a small inline label that never breaks away */
#quizArea span#questionNum {
    color: #000000;
    font-weight: bold;
    margin-right: 8px;
}

/* Question text inside a centered block; can wrap, but stays part of the same centered line */
#quizArea span#targetmaparea {
    color: #000000;
    font-weight: bold;
    display: inline;              /* not inline‑block, so it can break */
    white-space: normal;          /* allow natural line‑breaks */
}

/* Correct answer */
#quizArea span#correctAnswer {
    margin-left: 15px;
    color: #27ae60;
    font-weight: bold;
}

/* Keep the rest of your layout */
#quizArea > div:not(:first-child) {
    justify-content: center;
    gap: 30px;
    display: flex;
    align-items: center;
}

#quizArea > div:last-child {
    font-size: 18px;
    color: #2c3e50;
    margin-top: 5px;
}


/* COLLAPSIBLE LEFT PANEL */
.progress-panel {
    position: fixed;
    left: -320px;
    top: 230px;
    width: 300px;
    max-height: 70vh;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 15px 15px 0;
    padding: 20px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    font-size: 14px;
}

.progress-panel.expanded {
    left: 0;
}

.progress-panel h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#answeredItems div {
    margin: 8px 0;
    padding: 8px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

/* Toggle Button */
.toggle-panel {
    position: fixed;
    left: 10px;
    top: 200px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    padding: 12px 15px;
    cursor: pointer;
    z-index: 1003;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.toggle-panel:hover {
    background: #2980b9;
    transform: translateX(5px);
}

.zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.zoom-in {
    top: 10px;
}

.zoom-out {
    top: 50px;
}

.zoom-reset {
    top: 90px;
    /*right: 10px; */
}

/* SVG + Animations */
/*path {
    fill: rgba(54, 105, 38, 0.726);
    stroke: #000000;
}

.quiz-type-C path {
    fill: #f4d03fff;
    stroke: #b7950bff;
}*/

/* Prevent flash - Type C only */
.quiz-type-C path[name]:not(.quiz-path-visible) {
  visibility: hidden !important;
}


@media (hover: hover) {
    path:hover {
        fill: gray;
    }
}

.correct {
    fill: #32CD32 !important;
    stroke: #000000 !important;
    stroke-width: 1px !important;
    animation: celebrate 0.2s ease-in-out 1;
}

.incorrect {
    fill: #FFB6C1 !important;
    stroke: #8B0000 !important;
    stroke-width: 2px !important;
    animation: celebrate 0.2s ease-in-out 1;
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

path,
g {
    pointer-events: all !important;
    cursor: pointer;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
.progress-panel {
width: 280px;
left: -280px;
top: 100px;
}

.toggle-panel {
left: 5px;
top: 110px;
padding: 10px 12px;
font-size: 14px;
}

.container {
    height: 50vh !important;  /* Was 82vh, now 72vh - fills screen */
    margin: 4px auto !important;  /* Was 10px/0, now tiny 4px */
}
  
#labeledMapContainer {
    height: 50vh !important;
    margin: 4px auto !important;
}

  #quizArea {
font-size: 16px;
padding: 10px;
}
}
/* MAP FULL VISIBLE (preserve aspect ratio) */
.container svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Close panel on map click (bonus UX) */
.container {
    cursor: pointer;
}

.container:active + .progress-panel,
.container:active ~ .progress-panel {
    left: -320px !important;
}

/* Start screen (map blocked during start) */
#startScreen {
    pointer-events: none;
    height: 100%;
}

/* Labeled map container (mimic .container visually) */
#labeledMapContainer {
  width: 100%;
  max-width: 1000px;
  height: 88vh;
  margin: 0 auto 20px auto !important;  /* Remove bottom 20px */
  position: relative;
  overflow: hidden;
  background: #74e0d2;
  display: none;  /* Hidden by default */
}

#labeledMap {
    width: 100%;
    height: 100%;
}

#labeledMap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;  /* Kill all margins */
  padding: 0 !important;
}

/* HOVER TOOLTIP - Clean white bg, black text */
/* HOVER TOOLTIP - Perfect text fit */
#hoverTooltip {
    position: fixed;
    background: rgba(255,255,255,0.98);
    color: black;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 6px;      /* TIGHTER padding */
    margin: 0;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 0 1px 6px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 1004;
    display: none;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* SKIP BUTTON */

.correct-answer-text {
  text-anchor: middle !important;
  dominant-baseline: middle !important;
  font-size: 34px !important;
  font-weight: 900 !important;
  fill: #000 !important;
  pointer-events: none !important;
  stroke: rgba(255, 255, 255, 0.98) !important;
  stroke-width: 18px !important;
  stroke-linejoin: round !important;
  paint-order: stroke fill !important;
  
  /* WHITE BOX BACKGROUND */
  filter: drop-shadow(4px 4px 0 white, -4px -4px 0 white, 0 4px 0 white, 4px 0 0 white, 0 -4px 0 white, 0 0 8px white) !important;
  
  animation: slideUp 2s ease-out forwards;
}

@keyframes slideUp {
  0% { transform: translateY(0px); opacity: 1; }
  80% { transform: translateY(-35px); opacity: 1; }  /* Solid till end */
  81% { opacity: 0; }  /* Instant vanish */
  100% { transform: translateY(-45px); opacity: 0; }
}

