@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./assets/fonts/Poppins-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./assets/fonts/Poppins-Italic.ttf') format('truetype');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./assets/fonts/Poppins-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('./assets/fonts/Poppins-BoldItalic.ttf') format('truetype');
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: #d2e2fe;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0a0a0a;
}

.skriv-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 18px 26px;
  gap: 12px;
}

.skriv-main {
  display: flex;
  justify-content: center;
}

.skriv-editor-card {
  width: min(1200px, 96vw);
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.skriv-editor-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.skriv-editor {
  min-height: calc(100vh - 120px);
  width: 100%;
  background: #fff;
  border-radius: 14px;
  padding: 30px 30px 42px;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 24px;
  line-height: 1.8;
  color: #0a0a0a;
  border: 1px solid #e2e5ea;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.skriv-editor:focus {
  border-color: #e2e5ea;
  box-shadow: none;
}

.skriv-editor:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

.skriv-inline-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 860px;
  margin: 0 auto 2px;
  align-items: center;
  flex-wrap: wrap;
}

.skriv-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #d9dfeb;
  background: #eff5ff;
  color: #0a0a0a;
  font-size: 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.skriv-action img {
  width: 20px;
  height: 20px;
}

.skriv-fontsize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #3c4043;
  padding: 2px 6px;
  border: 1px solid #d0d7e4;
  border-radius: 8px;
  background: #eff5ff;
}

.skriv-fs-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #3c4043;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 120ms ease;
}

.skriv-fs-btn:hover {
  background: #e9eef7;
}

.skriv-fs-input {
  width: 52px;
  text-align: center;
  border: 1px solid #d0d7e4;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 14px;
  font-family: inherit;
  color: #3c4043;
  background: #ffffff;
  appearance: textfield;
}

.skriv-fs-input::-webkit-outer-spin-button,
.skriv-fs-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.skriv-fs-input:focus {
  outline: none;
  border-color: #3f6dd9;
  box-shadow: 0 0 0 1px #3f6dd9;
}

.skriv-action:hover {
  transform: translateY(-1px);
  border-color: #c7d3ea;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.skriv-action:active {
  transform: translateY(0);
  box-shadow: none;
}

.skriv-copy-toast {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #eff5ff;
  color: #0a0a0a;
  font-size: 12px;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.skriv-copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media print {
  body {
    background: #fff !important;
  }
  .ordveien-root,
  .ord-abc-panel,
  .ord-mic-panel,
  .skriv-inline-toolbar,
  .skriv-copy-toast {
    display: none !important;
  }
  .skriv-shell {
    padding: 0;
  }
  .skriv-editor-card,
  .skriv-editor-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .skriv-editor {
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
  }
}
@media (max-width: 640px) {
  .skriv-shell {
    padding: 24px 16px 48px;
  }

  .skriv-editor {
    font-size: 18px;
    padding: 22px;
  }
}
