/* Additions on top of the original compiled stylesheet (rewy.css):
   dialog shell + FAQ accordion, which were Radix components in the old build. */

/* ---------- Dialog (matches shadcn/ui Dialog) ---------- */
.rewy-dialog[hidden] { display: none; }
.rewy-dialog { position: fixed; inset: 0; z-index: 1000; }
.rewy-dialog-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .8);
  animation: rewy-fade-in .2s ease;
}
.rewy-dialog-content {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; gap: 1rem; width: calc(100% - 2rem); max-width: 32rem;
  max-height: 85vh; overflow-y: auto;
  border: 1px solid hsl(var(--border)); background: hsl(var(--background));
  padding: 1.5rem; border-radius: .5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .3), 0 4px 6px -4px rgba(0, 0, 0, .3);
  animation: rewy-zoom-in .2s ease;
}
.rewy-dialog-content.is-wide { max-width: 56rem; max-height: 80vh; }
.rewy-dialog-content.is-narrow { max-width: 28rem; }
.rewy-dialog-x {
  position: absolute; right: 1rem; top: 1rem; border-radius: .25rem;
  opacity: .7; transition: opacity .2s; color: hsl(var(--foreground));
}
.rewy-dialog-x:hover { opacity: 1; }
.rewy-dialog-title { font-size: 1.125rem; font-weight: 600; line-height: 1; letter-spacing: -.025em; }
.rewy-dialog-desc { font-size: .875rem; color: hsl(var(--muted-foreground)); }

@keyframes rewy-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rewy-zoom-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- FAQ accordion ---------- */
.rewy-acc-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .2s ease-out;
}
.rewy-acc-panel > div { overflow: hidden; }
[data-state="open"] > .rewy-acc-panel { grid-template-rows: 1fr; }

/* Hamburger -> X */
#menu-toggle.is-open span:nth-child(1) { transform: translateY(.375rem) rotate(45deg); }
#menu-toggle.is-open span:nth-child(2) { opacity: 0; }
#menu-toggle.is-open span:nth-child(3) { transform: translateY(-.375rem) rotate(-45deg); }

body.rewy-lock { overflow: hidden; }

/* Let the hidden attribute win over display utilities like .flex */
[hidden] { display: none !important; }
