/* ============================================================
   GAMIFICATION SYSTEM — Sete Lagoas Política
   ============================================================ */

/* ── Header Widget ── */
.gami-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--branco);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--trans-fast);
  cursor: pointer;
  margin-left: 1rem;
}

.gami-widget:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.gami-level-badge {
  color: var(--vermelho);
  font-family: var(--font-titulo);
  font-size: 1.1rem;
}

/* ── Toast Notifications ── */
#gami-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gami-toast {
  background: var(--card-bg);
  border-left: 4px solid #0f9e6e;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 300px;
}

.gami-toast.is-level-up {
  border-left-color: var(--vermelho);
  background: linear-gradient(to right, #FFFDE7, #FFFFFF);
}

.gami-toast-icon {
  font-size: 1.5rem;
}

.gami-toast-content strong {
  display: block;
  font-size: 0.9rem;
  color: var(--texto);
}

.gami-toast-content span {
  font-size: 0.8rem;
  color: var(--texto-suave);
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Dashboard (Conhecimentos) ── */
.gami-dashboard {
  background: var(--card-bg);
  border: 1px solid var(--borda);
  border-left: 5px solid var(--vermelho);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-md);
  margin-top: var(--gap-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
}

@media (max-width: 768px) {
  .gami-dashboard { grid-template-columns: 1fr; }
}

.gami-dash-header { margin-bottom: 1.5rem; }
.gami-dash-level-title {
  font-family: var(--font-titulo);
  font-size: 2rem;
  color: var(--texto);
  margin-bottom: 0.2rem;
}
.gami-dash-xp { font-size: 0.9rem; color: var(--texto-suave); font-weight: 600; }
.gami-progress-wrapper {
  background: var(--fundo);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 1rem;
}
.gami-progress-bar {
  background: linear-gradient(90deg, var(--vermelho), var(--azul));
  height: 100%;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gami-badges-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.gami-badge {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  width: 80px; text-align: center; opacity: 0.4; filter: grayscale(100%); transition: all 0.3s;
}
.gami-badge.is-unlocked { opacity: 1; filter: grayscale(0%); transform: translateY(-2px); }
.gami-badge-icon {
  width: 50px; height: 50px; background: var(--fundo); border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: var(--shadow-sm); border: 2px solid var(--borda);
}
.gami-badge.is-unlocked .gami-badge-icon {
  background: linear-gradient(135deg, var(--vermelho), #FF9800); border-color: transparent; color: white;
}
.gami-badge-name { font-size: 0.7rem; font-weight: 700; line-height: 1.2; }

/* ── Modal Quiz ── */
.gami-modal-overlay {
  position: fixed; inset: 0; background: rgba(18, 33, 43, 0.8); backdrop-filter: blur(4px);
  z-index: 100000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.gami-modal-overlay.is-open { opacity: 1; pointer-events: all; }
.gami-modal {
  background: var(--card-bg); width: 90%; max-width: 500px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); transform: translateY(20px) scale(0.95); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden; position: relative;
}
.gami-modal-overlay.is-open .gami-modal { transform: translateY(0) scale(1); }
.gami-modal-header {
  background: var(--azul-escuro); color: white; padding: 1rem 1.5rem; display: flex;
  justify-content: space-between; align-items: center;
}
.gami-modal-header h3 { color: white; margin: 0; font-size: 1.2rem; }
.gami-modal-close { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; opacity: 0.7; }
.gami-modal-close:hover { opacity: 1; }
.gami-modal-body { padding: 2rem 1.5rem; }
.gami-quiz-question { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.5rem; }
.gami-quiz-options { display: flex; flex-direction: column; gap: 0.8rem; }
.gami-quiz-btn {
  background: var(--fundo); border: 2px solid var(--borda); padding: 1rem; border-radius: var(--radius-sm);
  text-align: left; font-family: var(--font-corpo); font-size: 1rem; font-weight: 500; cursor: pointer; transition: all var(--trans-fast);
}
.gami-quiz-btn:hover { border-color: var(--azul); background: rgba(218,37,29,0.05); }
.gami-quiz-btn.is-correct { background: #e7f7ef; border-color: #0f9e6e; color: #087044; }
.gami-quiz-btn.is-wrong { background: #fff0ed; border-color: #DA251D; color: #7a1010; }
.gami-quiz-feedback { margin-top: 1.5rem; font-weight: 700; text-align: center; min-height: 24px; }
.gami-quiz-feedback.success { color: #0f9e6e; }
.gami-quiz-feedback.error { color: #DA251D; }
.gami-modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--borda); text-align: right; background: var(--fundo); }
