/* Prevent layout shifts and jumping */
html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Fixed navigation height */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 64px;
}

nav .flex {
  min-height: 44px;
}

/* Prevent image layout shifts */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Logo image specific sizing */
nav img {
  width: auto;
  height: 32px;
  object-fit: contain;
}

/* Main content area */
main,
.main-content {
  flex: 1;
  width: 100%;
}

/* Prevent content jumping */
.container {
  min-height: calc(100vh - 64px);
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Prevent flash of unstyled content */
body {
  visibility: visible;
  opacity: 1;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Consistent spacing */
.page-container {
  min-height: calc(100vh - 64px);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Ensure content containers are properly centered */
.max-w-7xl.mx-auto,
.max-w-2xl.mx-auto,
.max-w-4xl.mx-auto,
.max-w-6xl.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Ensure body content is centered */
body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Primary Color Variables */
:root {
  --primary-color: #f37333;
  --primary-dark: #d85a1f;
  --primary-light: #ff8c5a;
}

/* Primary Color Utility Classes */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-primary-dark {
  background-color: var(--primary-dark) !important;
}

.bg-primary-light {
  background-color: var(--primary-light) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-primary-dark {
  color: var(--primary-dark) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.hover\:bg-primary-dark:hover {
  background-color: var(--primary-dark) !important;
}

.hover\:text-primary-dark:hover {
  color: var(--primary-dark) !important;
}

.focus\:ring-primary:focus {
  --tw-ring-color: var(--primary-color) !important;
}

.max-w-7xl {
  max-width: 1700px !important;
  width: 100%;
}
.client-reply .items-start {
  justify-content: flex-end !important;
}

/* =====================================================================
   Rich text / prose list rendering
   Tailwind resets list-style. Re-enable for .prose and Quill-generated
   content so bullet points and numbered lists display correctly in
   ticket descriptions, replies, and email previews.
   ===================================================================== */
.prose ul,
.communication-message-content ul,
.ql-editor ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose ol,
.communication-message-content ol,
.ql-editor ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose li,
.communication-message-content li,
.ql-editor li {
  display: list-item;
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

/* Nested lists */
.prose ul ul,
.communication-message-content ul ul {
  list-style-type: circle;
}

.prose ul ul ul,
.communication-message-content ul ul ul {
  list-style-type: square;
}

/* Prevent iOS from zooming when focusing inputs/comment box (iOS zooms if font-size < 16px).
   Use 18px so comment/reply Quill editor and all fields stay above threshold. */
@media screen and (max-width: 767px) {
  input,
  textarea,
  select {
    font-size: 18px !important;
  }
  /* Reply/comment box is Quill rich text (contenteditable), not input/textarea */
  .ql-editor,
  [contenteditable="true"] {
    font-size: 18px !important;
    min-height: 1.5em;
  }
}