/* =====================================================================
 * modals.css
 * Overlays e elementos flutuantes: modal de anúncio, barra de progresso,
 * toast, confete (CSS puro).
 * ===================================================================== */

/* ========== MODAL OVERLAY ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.1);
  color: var(--color-text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition);
  opacity: 0;
  pointer-events: none;
}
.modal-close.visible { opacity: 1; pointer-events: auto; }
.modal-close:hover { background: rgba(255,255,255,0.2); }

/* ========== AD CONTENT ========== */
.ad-emoji { font-size: 4rem; margin-bottom: 16px; display: block; }
.ad-brand { font-size: 1.3rem; font-weight: 700; color: var(--color-accent); }
.ad-tagline {
  color: var(--color-muted);
  margin: 8px 0 24px;
  font-style: italic;
}
.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-muted);
  margin-bottom: 16px;
}

/* ========== PROGRESS BAR ========== */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 20px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
  transition: width 1s linear;
  width: 0%;
}
.countdown-text {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 12px;
}

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100% - 32px);
  pointer-events: none;
}
.toast {
  background: var(--color-surface);
  color: var(--color-text);
  border-left: 4px solid var(--color-accent);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}
.toast.error   { border-left-color: var(--color-danger); }
.toast.success { border-left-color: var(--color-success); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CONFETTI ========== */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1500;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 16px;
  top: -20px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotateZ(0deg);    opacity: 1; }
  100% { transform: translateY(105vh) rotateZ(720deg);  opacity: 0.6; }
}
