/* Shared Responsive & Touch Ergonomics System for Özüt APP */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
}

/* KaTeX & Diagram Overflow Protection */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 4px 0;
}

.diagram-kutu svg,
.soru-diyagram svg,
.a4-sheet svg[viewBox],
.a4-preview-sheet svg[viewBox] {
  max-width: 100%;
  height: auto;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 14px -2px rgba(56, 189, 248, 0.45);
}

/* Scrollbar hiding for horizontal touch rails */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Responsive A4 Viewer Shell */
.ra4-root {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ra4-toolbar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ra4-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #1E293B;
  border-radius: 10px;
  padding: 4px;
}

.ra4-zoom-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #94A3B8;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  min-height: 36px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ra4-zoom-btn:hover {
  color: #F8FAFC;
  background: rgba(56, 189, 248, 0.08);
}

.ra4-zoom-btn.active {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}

.ra4-viewport {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  justify-content: center;
}

.ra4-scale-box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
  transition: height 0.12s ease-out;
}

.ra4-sheet-frame {
  width: 794px;
  flex-shrink: 0;
  transform-origin: top center;
  will-change: transform;
}

/* Mobile & Tablet Touch Ergonomics */
@media (max-width: 767px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  button,
  .btn,
  .pill,
  .tab-btn,
  .ra4-zoom-btn,
  [role="button"] {
    min-height: 44px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
  }
}
