/* quota_modal.css — Daily quota exhausted bottom-sheet
   Mirrors the upgrade modal's calm bottom-sheet language (.upm). */
.qqm {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-overlay, 2147483000) + 1);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.qqm.qqm--open {
  display: flex;
}
.qqm-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.qqm-sheet {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--spacing-lg);
  padding-top: var(--spacing-md);
  padding-bottom: calc(var(--spacing-lg) + var(--safe-bottom));
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.qqm.qqm--open .qqm-sheet {
  animation: qqmSheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes qqmSheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.qqm-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill);
  margin: 0 auto var(--spacing-md);
}
.qqm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.qqm-close:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.qqm-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.qqm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--accent-dim);
  color: var(--primary);
}
.qqm-title {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}
.qqm-text {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}
.qqm-text .qqm-resource {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.qqm-count {
  display: inline-block;
  margin-top: var(--spacing-xs);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.qqm-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
}
.qqm-countdown {
  font-weight: var(--weight-bold);
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.qqm-upgrade {
  width: 100%;
  padding: 0.8rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, #a78bfa 100%);
  color: #fff;
  border: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  font-family: var(--font-display);
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.qqm-upgrade:hover {
  opacity: 0.92;
}
.qqm-upgrade:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.qqm-later {
  margin-top: var(--spacing-sm);
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.qqm-later:hover {
  color: var(--text-secondary);
}
.qqm-later:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Desktop */
@media (min-width: 769px) {
  .qqm {
    align-items: center;
    padding: 1rem;
  }
  .qqm-sheet {
    border-radius: var(--radius-lg);
    max-width: 380px;
    padding-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-modal);
  }
  .qqm-handle {
    display: none;
  }
  .qqm.qqm--open .qqm-sheet {
    animation: qqmCenterIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
}
@keyframes qqmCenterIn {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .qqm.qqm--open .qqm-sheet {
    animation: none;
  }
}
