/**
 * Kokende — modales et toasts (hors wp-admin).
 */

:root {
  --kokende-green: #00bf63;
  --kokende-blue: #0071e3;
  --kokende-red: #dc2626;
}

#kokende-ui-overlay-host {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
}

#kokende-ui-overlay-host .kokende-ui-modal-backdrop {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.kokende-ui-modal {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  max-width: 420px;
  width: 100%;
  padding: 1.25rem 1.35rem;
}

.kokende-ui-modal__text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #111827;
  line-height: 1.45;
  white-space: pre-line;
}

.kokende-ui-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.kokende-ui-btn {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.kokende-ui-btn--red {
  background: var(--kokende-red);
  color: #fff;
}

.kokende-ui-btn--blue {
  background: var(--kokende-blue);
  color: #fff;
}

.kokende-ui-btn--green {
  background: var(--kokende-green);
  color: #fff;
}

.kokende-ui-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: auto;
  bottom: auto;
  transform: translateX(120%);
  z-index: 99995;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  max-width: min(92vw, 420px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.kokende-ui-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.kokende-ui-toast--confirmed {
  background: #ecfdf5;
  color: var(--kokende-green);
  border: 1px solid rgba(0, 191, 99, 0.35);
}

.kokende-ui-toast--cancelled {
  background: #eff6ff;
  color: var(--kokende-green);
  border: 1px solid rgba(0, 113, 227, 0.35);
}

.kokende-ui-toast--deleted {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

/* Session / paiement — warning flottant */
.kokende-session-warn {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 99980;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  padding: 1rem;
}

.kokende-session-warn__box {
  background: #fff;
  border-radius: 1rem;
  max-width: 480px;
  width: 100%;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.kokende-session-warn__text {
  margin: 0 0 1rem;
  color: var(--kokende-blue);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

.kokende-session-warn__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.kokende-session-warn__btn-stay {
  background: var(--kokende-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.kokende-session-warn__btn-red {
  background: var(--kokende-red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
