/* =========================================================
   DRAQEE PUBLIC FRONTEND — RESPONSIVE FOUNDATION
   Scope: public/frontend UI only. No admin styles or logic.
   Keeps the existing visual design while hardening layout behavior.
   ========================================================= */

:root {
  --draqee-page-max: 1280px;
  --draqee-page-gutter: 32px;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Media stays inside the box and keeps its natural proportions. */
img,
picture,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* Flex/grid children are allowed to shrink instead of pushing the page wide. */
main,
section,
article,
aside,
header,
footer,
nav,
div,
form,
fieldset {
  min-width: 0;
}

/* Long user/content strings must not create horizontal page overflow. */
p,
li,
td,
th,
blockquote {
  overflow-wrap: break-word;
}

/* Form controls remain inside their parent on narrow displays. */
input,
select,
textarea,
button {
  max-width: 100%;
}

textarea {
  resize: vertical;
}

/* Reusable boxed public-site container for new/updated frontend sections. */
.draqee-container {
  width: min(100% - (var(--draqee-page-gutter) * 2), var(--draqee-page-max));
  margin-inline: auto;
}

/* Existing Tailwind 7xl containers are the site's primary boxed layout. */
.max-w-7xl {
  width: 100%;
  max-width: var(--draqee-page-max) !important;
}

/* Keep wide tables usable without making the whole viewport scroll. */
.table-responsive,
.overflow-x-auto {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  :root {
    --draqee-page-gutter: 24px;
  }
}

@media (max-width: 767px) {
  :root {
    --draqee-page-gutter: 20px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  /* Avoid iOS zoom/layout jumps on interactive fields. */
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  :root {
    --draqee-page-gutter: 16px;
  }
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}
