/* ==========================================================
   Modal Component
   ========================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-lg);
  animation: modal-fade-in 200ms ease forwards;
}

.modal {
  background: var(--tg-theme-section-bg-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modal-slide-up 250ms ease forwards;
}

.modal-header {
  padding: var(--space-xl) var(--space-xl) var(--space-sm);
  font-size: var(--font-lg);
  font-weight: var(--weight-semibold);
  color: var(--tg-theme-text-color);
}

.modal-body {
  padding: var(--space-sm) var(--space-xl) var(--space-lg);
  font-size: var(--font-md);
  color: var(--tg-theme-text-color);
}

.modal-footer {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl) var(--space-xl);
}

.modal-footer .btn {
  flex: 1;
}

/* --- Animations --- */

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
