/* author: Anastasiya Olshansky (c) 2026 */
:root { color-scheme: light; }

[data-bs-theme="light"] {
  --app-bg: #f6f7fb;
  --app-card-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --app-muted: #64748b;
  --toggle-bg: #ffffff;
  --toggle-border: #e2e8f0;
  --toggle-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  --toggle-divider: #e2e8f0;
  --toggle-muted: #64748b;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --app-bg: #020617;
  --app-card-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --app-muted: #94a3b8;
  --toggle-bg: #020617;
  --toggle-border: #1e293b;
  --toggle-shadow: none;
  --toggle-divider: #334155;
  --toggle-muted: #94a3b8;
}

body {
  background: var(--app-bg);
  min-height: 100vh;
}

.app-card {
  max-width: 920px;
  margin: 48px auto;
  border: 0;
  border-radius: 1.25rem;
  box-shadow: var(--app-card-shadow);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.small-muted,
.form-text {
  color: var(--app-muted);
}

.small-muted {
  font-size: 0.925rem;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 767.98px) {
  .header-row {
    flex-direction: column-reverse;
  }

  .settings-panel {
    align-self: flex-end;
  }
}

.smart-toggle {
  align-items: center;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  box-shadow: var(--toggle-shadow);
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.35rem 0.45rem;
  user-select: none;
}

.theme-toggle,
.lang-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--toggle-muted);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  min-width: 2rem;
  padding: 0 0.55rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.theme-toggle {
  width: 2rem;
  padding: 0;
}

.theme-toggle svg {
  display: block;
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
}

.theme-toggle:hover,
.lang-toggle:hover {
  transform: translateY(-1px);
}

.lang-toggle.active {
  background: #2563eb;
  color: #ffffff;
}

.toggle-divider {
  background: var(--toggle-divider);
  height: 1.2rem;
  margin: 0 0.25rem;
  width: 1px;
}

.progress-area {
  display: none;
}

.progress-area.active {
  display: block;
}

.details-card,
.result-box,
.drop-zone {
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-body-bg);
}

.details-card {
  padding: 1rem;
}

.drop-zone {
  padding: 1rem;
  transition: border-color .15s ease, background-color .15s ease;
}

.drop-zone.drag-over {
  border-color: #2563eb;
  background: rgba(37, 99, 235, .08);
}

.result-box {
  min-height: 5rem;
  padding: 1rem;
}

.format-badge {
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  padding: .35rem .6rem;
  font-size: .8rem;
  color: var(--app-muted);
  background: var(--bs-body-bg);
}

.check-list {
  margin: .75rem 0 0;
  padding-left: 1.1rem;
}

.check-list li {
  margin-bottom: .24rem;
}

.page-link-row {
  margin-top: 0.75rem;
}

.schema-editor {
  min-height: 13rem;
  resize: vertical;
  white-space: pre;
  tab-size: 2;
}

.custom-file-control {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.custom-file-button {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.custom-file-name {
  border-bottom-left-radius: 0;
  border-left: 0;
  border-top-left-radius: 0;
  color: var(--bs-body-color);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .custom-file-control {
    flex-direction: column;
  }

  .custom-file-button {
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    width: 100%;
  }

  .custom-file-name {
    border-left: 1px solid var(--bs-border-color);
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
  }
}

