/* Modern Soru Kesici Styles */

:root {
  --brand-color: #0ea5e9;
}

.export-spinner {
  animation: export-spin 0.9s linear infinite;
}

@keyframes export-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

::selection {
  background-color: rgba(14, 165, 233, 0.2);
  color: #0369a1;
}

/* Hide scrollbars but keep functionality if needed */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Print specific overrides if any */
@media print {
  body {
    background: white !important;
  }
}

.settings-textbox,
#classBranchInput {
  max-width: 252px;
}

#testDescInput {
  min-height: 64px;
}

.page-margin-card {
  display: grid;
  gap: 8px;
}

.margin-inline-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.margin-inline-item {
  display: grid;
  gap: 6px;
}

.margin-inline-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-swatch-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.theme-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.theme-swatch:hover {
  transform: translateY(-1px);
}

.theme-swatch.is-active {
  border-color: #0f172a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 0 0 3px rgba(15, 23, 42, 0.08);
}

.theme-palette-toggle {
  width: 100%;
  height: 40px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.theme-palette-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 230px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  z-index: 40;
}

.theme-palette-chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.08);
  background: var(--brand-color);
  flex-shrink: 0;
}

.page-settings-compact .legacy-settings-block {
  display: none !important;
}

#appRoot,
#poolView,
#previewView {
  overflow-x: hidden;
}

#canvasContainer,
#pdfCanvas,
#selectionBox,
#quickAnswerMenu,
#selectionEditorCanvasContainer,
#selectionEditorCanvas,
#selectionEditorBox {
  touch-action: none;
}

#appNotice {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  transform: translateY(-4px);
}

#appNotice.is-visible {
  transform: translateY(0);
}

.optical-choice-btn.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.help-content {
  display: grid;
  gap: 18px;
}

.help-section {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
}

.help-section h3 {
  margin: 0 0 8px;
  color: #075985;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
}

.help-section p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

.help-section strong {
  color: #0f172a;
  font-weight: 700;
}

@media (max-width: 1023px) {
  body.mobile-panel-open {
    overflow: hidden;
  }

  #settingsPanel {
    width: auto;
    max-height: calc(100vh - 100px);
    -webkit-overflow-scrolling: touch;
  }

  #settingsPanel .custom-scrollbar {
    overflow: visible;
  }

  .settings-textbox,
  #classBranchInput {
    max-width: none;
  }

  #appNotice {
    top: 132px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .theme-swatch-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .margin-inline-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #selectionList {
    grid-template-columns: minmax(0, 1fr);
  }

  #cropperModal,
  #selectionEditorModal {
    padding: 8px;
  }

  #viewerControls {
    width: 100%;
    justify-content: space-between;
  }

  #pdfSourceToolbar {
    width: 100%;
  }

  #quickAnswerMenu {
    transform: scale(0.92);
    transform-origin: top left;
  }
}
