/* Overlays: bottom sheet / dialog, toasts, empty and skeleton states. */

/* ------------------------------------------------------------------ sheet */
.sheet-host {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.sheet-host.is-open { display: block; }

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.5);
  animation: fade 0.18s ease;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-3);
  animation: slide-up 0.22s cubic-bezier(0.22, 0.8, 0.3, 1);
}

@media (min-width: 720px) {
  .sheet {
    left: 50%;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 92vw);
    right: auto;
    border-radius: var(--r-xl);
    max-height: 86vh;
    animation: fade 0.18s ease;
  }
}

.sheet__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.sheet__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 660;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(18px + var(--safe-bottom));
}

@keyframes slide-up {
  from { transform: translateY(14%); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

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

/* ------------------------------------------------------------------ toast */
.toast-host {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(92px + var(--safe-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  font-size: 13.5px;
  animation: slide-up 0.2s ease;
}

.toast--error { border-color: var(--danger); color: var(--danger); }
.toast--ok { border-color: var(--st-paid); color: var(--st-paid); }

/* --------------------------------------------------------- empty/skeleton */
.empty {
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.empty__icon {
  font-size: 30px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.sk {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface-3) 37%,
    var(--surface-2) 63%
  );
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  border-radius: var(--r-sm);
}

@keyframes sk {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-top: 1px solid var(--border);
}

.sk-row:first-child { border-top: 0; }
