/* TotalDeal — custom alert / confirm / prompt (replaces native browser dialogs) */
.td-app-dialog-host {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.44) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: tdAppDialogFadeIn 0.18s ease-out;
}

.td-app-dialog-host.td-app-dialog-leaving {
  animation: tdAppDialogFadeOut 0.14s ease-in forwards;
}

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

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

.td-app-dialog-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  animation: tdAppDialogPanelIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.td-app-dialog-host.td-app-dialog-leaving .td-app-dialog-panel {
  animation: tdAppDialogPanelOut 0.14s ease-in forwards;
}

@keyframes tdAppDialogPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tdAppDialogPanelOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

.td-app-dialog-body {
  padding: 22px 22px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.td-app-dialog-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.td-app-dialog-icon--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.td-app-dialog-icon--success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.td-app-dialog-icon--warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.td-app-dialog-icon--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.td-app-dialog-copy {
  min-width: 0;
  flex: 1;
}

.td-app-dialog-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.td-app-dialog-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
  font-weight: 500;
  white-space: pre-wrap;
  word-break: break-word;
}

.td-app-dialog-input-wrap {
  margin-top: 14px;
}

.td-app-dialog-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.td-app-dialog-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.td-app-dialog-foot {
  padding: 10px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.td-app-dialog-btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.td-app-dialog-btn:active {
  transform: translateY(1px);
}

.td-app-dialog-btn--ghost {
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  border-color: rgba(226, 232, 240, 0.95);
  font-weight: 600;
}

.td-app-dialog-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.95);
}

.td-app-dialog-btn--primary {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.td-app-dialog-btn--primary:hover {
  background: #1e293b;
}

.td-app-dialog-btn--danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}

.td-app-dialog-btn--danger:hover {
  background: #b91c1c;
}
