/* ===== TALLY MODAL ===== */
.tally-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tally-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.tally-modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 640px;
  height: 85vh;
  max-height: 700px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tally-modal--info {
  height: auto;
  max-height: 90vh;
  max-width: 480px;
  margin: auto;
}

.tally-overlay.is-visible .tally-modal {
  transform: translateY(0);
}

.tally-modal__header {
  padding: 20px 48px 20px 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-weight: var(--font-weight-extrabold);
  font-size: var(--text-lg);
  color: var(--color-text-primary);
}

.tally-modal__footer {
  padding: 16px 24px;
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.tally-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface-alt);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.tally-modal__close:hover {
  background: var(--color-border);
}

.tally-iframe {
  width: 100%;
  flex: 1;
  border: none;
}
