/* =========================================================
   REVION — bildirim (toast) + onay penceresi  (js/ui.js)
   Site ve yönetim panelinde ortak; kendi renk değişkenleri var.
   ========================================================= */
:root {
  --rv-surface: #ffffff;
  --rv-heading: #071a3a;
  --rv-text: #36435a;
  --rv-shadow: 0 18px 48px -12px rgba(15, 27, 51, .28), 0 4px 12px rgba(15, 27, 51, .08);
  --rv-ghost: #edf1f8;
  --rv-ghost-hover: #dfe6f2;
  --rv-backdrop: rgba(9, 18, 36, .55);
  --rv-brand: #2272d4;
  --rv-brand-hover: #1a5cb4;
  --rv-success: #1e8f4a;
  --rv-error: #d03434;
  --rv-error-hover: #b32626;
  --rv-warn: #c27803;
  --rv-info: #2272d4;
  --rv-font: var(--font-body, "Archivo"), system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  --rv-surface: #12234a;
  --rv-heading: #f3f6fb;
  --rv-text: #c6cfdd;
  --rv-shadow: 0 18px 48px -12px rgba(0, 0, 0, .7), 0 4px 12px rgba(0, 0, 0, .35);
  --rv-ghost: #1c3160;
  --rv-ghost-hover: #26407a;
  --rv-backdrop: rgba(2, 6, 14, .7);
  --rv-brand: #4d8ff5;
  --rv-brand-hover: #6aa2f7;
  --rv-success: #4fd17c;
  --rv-error: #f26b6b;
  --rv-error-hover: #f58585;
  --rv-warn: #f3b552;
  --rv-info: #6aa2f7;
}

/* ---------------- Toast ---------------- */
.rv-toasts {
  position: fixed; z-index: 2000;
  right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.rv-toast {
  --t: var(--rv-success);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 28px; align-items: center; gap: 12px;
  padding: 12px 10px 12px 12px;
  border-radius: 14px;
  background: var(--rv-surface);
  box-shadow: var(--rv-shadow);
  font-family: var(--rv-font); -webkit-font-smoothing: antialiased;
  pointer-events: auto;
  opacity: 0; transform: translateY(16px);
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .3, 1);
}
.rv-toast.is-in { opacity: 1; transform: none; }
.rv-toast.is-out { opacity: 0; transform: translateX(24px); }
.rv-toast--error { --t: var(--rv-error); }
.rv-toast--warn { --t: var(--rv-warn); }
.rv-toast--info { --t: var(--rv-info); }
.rv-toast__ico {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px; line-height: 1;
  background: var(--t); color: #fff;
  font-size: 18px;
}
:root[data-theme="dark"] .rv-toast__ico { color: #0b1424; }
.rv-toast__body { min-width: 0; }
.rv-toast__title { display: block; color: var(--rv-heading); font-weight: 700; font-size: .875rem; line-height: 1.35; letter-spacing: 0; font-family: var(--rv-font); }
.rv-toast__msg { margin: 2px 0 0; font-family: var(--rv-font); color: var(--rv-text); font-size: .8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.rv-toast__x {
  display: grid; place-items: center;
  width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--rv-text);
  font-size: 14px; cursor: pointer;
}
.rv-toast__x:hover { background: var(--rv-ghost); color: var(--rv-heading); }
.rv-toast__x:focus-visible, .rv-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--rv-brand) 45%, transparent); outline-offset: 2px; }
.rv-toast__bar {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--t); opacity: .5;
  transform-origin: left; transform: scaleX(1);
}
@media (max-width: 599px) {
  .rv-toasts { right: 16px; bottom: 16px; left: 16px; width: auto; }
  .rv-toast.is-out { transform: translateY(16px); }
}

/* ---------------- Onay penceresi ---------------- */
.rv-noscroll { overflow: hidden; }
.rv-confirm {
  position: fixed; inset: 0;
  width: min(420px, calc(100vw - 32px)); max-width: none;
  height: fit-content; max-height: calc(100vh - 32px);
  margin: auto; padding: 0;
  border: 0; border-radius: 18px;
  background: var(--rv-surface); color: var(--rv-text);
  box-shadow: var(--rv-shadow);
  overflow: auto;
  animation: rv-pop .2s cubic-bezier(.2, .8, .3, 1);
}
.rv-confirm::backdrop { background: var(--rv-backdrop); animation: rv-fade .2s ease; }
.rv-confirm.is-out { opacity: 0; transform: scale(.97); transition: opacity .15s, transform .15s; }
.rv-confirm.is-out::backdrop { opacity: 0; transition: opacity .15s; }
.rv-confirm__box { display: grid; justify-items: center; padding: 28px 24px 20px; text-align: center; }
.rv-confirm__ico {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%;
  background: color-mix(in srgb, var(--rv-brand) 14%, var(--rv-surface)); color: var(--rv-brand);
  font-size: 24px;
}
.rv-confirm--danger .rv-confirm__ico { background: color-mix(in srgb, var(--rv-error) 14%, var(--rv-surface)); color: var(--rv-error); }
.rv-confirm__title { margin: 0; color: var(--rv-heading); font-weight: 800; font-size: 1.25rem; line-height: 1.25; font-family: var(--rv-font); }
.rv-confirm__msg { margin: 8px 0 0; font-family: var(--rv-font); font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.rv-confirm__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 22px; }
.rv-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 12px;
  font-weight: 700; font-size: .9375rem; line-height: 1.2; font-family: var(--rv-font);
  cursor: pointer; transition: background-color .15s;
}
.rv-btn--ghost { background: var(--rv-ghost); color: var(--rv-heading); }
.rv-btn--ghost:hover { background: var(--rv-ghost-hover); }
.rv-btn--primary { background: var(--rv-brand); color: #fff; }
.rv-btn--primary:hover { background: var(--rv-brand-hover); }
.rv-btn--danger { background: var(--rv-error); color: #fff; }
.rv-btn--danger:hover { background: var(--rv-error-hover); }
:root[data-theme="dark"] .rv-btn--primary, :root[data-theme="dark"] .rv-btn--danger { color: #0b1424; }
@keyframes rv-pop { from { opacity: 0; transform: scale(.95) translateY(6px); } }
@keyframes rv-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .rv-toast, .rv-confirm, .rv-confirm::backdrop { animation: none; transition: none; }
}
