/* =====================================================================
   Aanvullende stijlen (plain CSS) voor elementen die door JavaScript
   worden aangemaakt: toasts en modals. De rest zit in Tailwind.
   Kleuren via de thema-variabelen uit includes/thema.php
   (--night-*, --slate-*, --c-white, --brand-*), "R G B"-formaat.
   ===================================================================== */

[x-cloak] { display: none !important; }

html { -webkit-tap-highlight-color: transparent; }

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Dunne scrollbar */
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: rgb(var(--c-white) / .12) transparent; }
.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgb(var(--c-white) / .12); border-radius: 999px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------------
   Toasts
   --------------------------------------------------------------------- */
.toast-root {
  position: fixed; z-index: 100; right: 1rem; bottom: 1rem; left: 1rem;
  display: flex; flex-direction: column; align-items: flex-end; gap: .5rem;
  pointer-events: none;
}
@media (min-width: 640px) { .toast-root { left: auto; } }

.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: .75rem;
  width: 100%; max-width: 24rem;
  padding: .75rem 1rem;
  border-radius: .875rem; border: 1px solid;
  font-size: .875rem; line-height: 1.35; color: rgb(var(--slate-100));
  background: rgb(var(--night-850) / .95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(8px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}
@media (min-width: 640px) { .toast { width: auto; min-width: 16rem; } }
.toast.is-visible { opacity: 1; transform: none; }
.toast svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.toast-success { border-color: rgba(16,185,129,.35); }
.toast-success svg { color: #10b981; }
.toast-error { border-color: rgba(244,63,94,.4); }
.toast-error svg { color: #f43f5e; }
.toast-info { border-color: rgb(var(--brand-500) / .35); }
.toast-info svg { color: rgb(var(--brand-500)); }

/* ---------------------------------------------------------------------
   Modal (App.confirm)
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .15s ease;
}
@media (min-width: 640px) { .modal-overlay { align-items: center; } }
.modal-overlay.is-visible { opacity: 1; }

.modal {
  width: 100%; max-width: 28rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid rgb(var(--c-white) / .08);
  background: rgb(var(--night-850));
  box-shadow: 0 30px 60px -15px rgba(0,0,0,.5);
  transform: translateY(12px) scale(.98);
  transition: transform .2s ease;
}
.modal-overlay.is-visible .modal { transform: none; }

.modal-title { margin: 0; font-size: 1rem; font-weight: 600; color: rgb(var(--c-white)); }
.modal-message { margin: .5rem 0 0; font-size: .875rem; color: rgb(var(--slate-400)); white-space: pre-line; }
.modal-label { display: block; margin: 1.25rem 0 .375rem; font-size: .75rem; font-weight: 500; color: rgb(var(--slate-400)); }
.modal-input {
  width: 100%; resize: vertical; min-height: 5rem;
  padding: .625rem .875rem; border-radius: .75rem;
  border: 1px solid rgb(var(--c-white) / .1); background: rgb(var(--night-900));
  color: rgb(var(--slate-100)); font: inherit; font-size: .875rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.modal-input:focus { border-color: rgb(var(--brand-500) / .6); box-shadow: 0 0 0 4px rgb(var(--brand-500) / .1); }
.modal-error { margin: .375rem 0 0; font-size: .75rem; color: #f43f5e; }

.modal-actions { display: flex; flex-direction: column-reverse; gap: .5rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .modal-actions { flex-direction: row; justify-content: flex-end; } }

.modal-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .625rem 1rem; border-radius: .75rem;
  font: inherit; font-size: .875rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s, opacity .15s;
}
.modal-btn:disabled { opacity: .5; cursor: not-allowed; }
.modal-cancel { background: rgb(var(--c-white) / .05); border-color: rgb(var(--c-white) / .1); color: rgb(var(--slate-200)); }
.modal-cancel:hover { background: rgb(var(--c-white) / .1); }
.modal-confirm { background: rgb(var(--brand-500)); color: #fff; }
.modal-confirm:hover { background: rgb(var(--brand-600)); }
.modal-confirm.is-danger { background: #e11d48; }
.modal-confirm.is-danger:hover { background: #be123c; }
