/* ── only4you shared UI: toast + modal ───────────────────────────────── */
/* Used by app.js (main chat) and admin.js (admin dashboard) to replace
   browser alert/confirm with on-brand styled equivalents. */

/* ── Toast ────────────────────────────────────────────────────────────── */
.o4y-toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 24px);
}

.o4y-toast {
  background: var(--surface, #1e1430);
  color: var(--text, #f0e6ff);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 92vw;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 0 1px rgba(124,58,237,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  pointer-events: auto;
}
.o4y-toast.is-visible { opacity: 1; transform: translateY(0); }

.o4y-toast--info    { border-color: rgba(124,58,237,0.35); }
.o4y-toast--success { border-color: rgba(74,222,128,0.35); color: #bbf7d0; }
.o4y-toast--error   { border-color: rgba(239,68,68,0.4);  color: #fecaca; }

.o4y-toast__dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.o4y-toast--info    .o4y-toast__dot { background: #c4b5fd; }
.o4y-toast--success .o4y-toast__dot { background: #4ade80; }
.o4y-toast--error   .o4y-toast__dot { background: #f87171; }

/* ── Modal ────────────────────────────────────────────────────────────── */
.o4y-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
.o4y-modal-backdrop.is-visible { opacity: 1; }

.o4y-modal {
  background: var(--surface, #1e1430);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 18px;
  max-width: 380px;
  width: 100%;
  color: var(--text, #f0e6ff);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 80px rgba(233,30,140,0.08);
  transform: scale(0.96);
  transition: transform 0.18s ease-out;
  overflow: hidden;
}
.o4y-modal-backdrop.is-visible .o4y-modal { transform: scale(1); }

.o4y-modal__body {
  padding: 22px 22px 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.o4y-modal__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text, #f0e6ff);
}
.o4y-modal__msg {
  color: var(--text-dim, rgba(240,230,255,0.7));
  font-size: 13.5px;
}

.o4y-modal__actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  justify-content: flex-end;
}

.o4y-modal__btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.o4y-modal__btn--cancel {
  background: transparent;
  color: var(--text-dim, rgba(240,230,255,0.7));
  border-color: var(--border, rgba(255,255,255,0.1));
}
.o4y-modal__btn--cancel:hover {
  background: var(--surface2, #261a3d);
  color: var(--text, #f0e6ff);
}
.o4y-modal__btn--ok {
  background: linear-gradient(135deg, #e91e8c, #c2185b);
  color: #fff;
  border-color: transparent;
}
.o4y-modal__btn--ok:hover { filter: brightness(1.08); }
.o4y-modal__btn--danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}
