/*
 * Small hand-written additions that sit on top of the compiled Tailwind file
 * (app.css, rebuilt from the Next.js globals). Kept separate so rebuilding
 * app.css never wipes them.
 */

/* ---- Live demo pop-up (see app/views/partials/demo-modal.php + js/main.js) ---- */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  animation: demo-modal-in 0.18s ease-out;
}
@media (min-width: 640px) {
  .demo-modal { padding: 24px; }
}
@keyframes demo-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.demo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.demo-modal__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1180px;
  height: 88vh;
  height: 88dvh;
  overflow: hidden;
  padding: 9px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 26, 40, 0.06), 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
.demo-modal__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
}
.demo-modal__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #edeef1;
  border-bottom: 1px solid #dcdee5;
}
@media (min-width: 640px) {
  .demo-modal__bar { padding: 12px 20px; }
}
.demo-modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #5b5e70;
}
.demo-modal__title > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-modal__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e0562c;
}
.demo-modal__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-modal__cta {
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(160deg, #f79471 0%, #ef7250 100%);
  transition: transform 0.15s ease;
}
.demo-modal__cta:hover { transform: translateY(-1px); }
.demo-modal__cta--bar { display: none; height: 36px; padding: 0 16px; }
@media (min-width: 640px) {
  .demo-modal__cta--bar { display: inline-flex; }
}
.demo-modal__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8a8da0;
  font-size: 16px;
  cursor: pointer;
}
.demo-modal__close:hover { background: #e3e5ea; color: #16161c; }
.demo-modal__frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}
/* Same sign-up button repeated at the bottom on phones, where the bar hides it. */
.demo-modal__foot {
  flex: none;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: #edeef1;
  border-top: 1px solid #dcdee5;
}
.demo-modal__cta--foot { display: flex; width: 100%; height: 40px; font-size: 13.5px; }
@media (min-width: 640px) {
  .demo-modal__foot { display: none; }
}

/* ---- Demo tables ----
 * The Next.js app draws its own scroll bar under wide tables (TableScroll.tsx) and hides
 * the native one. The PHP pages are static, so keep the browser's own bar visible. */
.tscroll-native { scrollbar-width: thin; }
.tscroll-native::-webkit-scrollbar { display: block; height: 8px; }
.tscroll-native::-webkit-scrollbar-thumb { background: #c9ccd6; border-radius: 999px; }

/* Written legal pages (/privacy, /terms): headings, lists and links inside <article class="legal"> */
.legal h2 { margin-top: 2.25rem; font-size: 22px; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink, #181a28); }
.legal p { margin-top: 1rem; }
.legal ul { margin-top: 0.9rem; padding-left: 1.4rem; list-style: disc; }
.legal li { margin-top: 0.5rem; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal strong { color: var(--ink, #181a28); font-weight: 600; }
