@font-face {
  font-family: 'formaatjebold';
  src: url(formaatjebold.woff) format('woff');
  font-display: swap; }

@font-face {
  font-family: 'formaatjeregular';
  src: url(formaatjeregular.woff) format('woff');
  font-display: swap; }

:root {
  --navy: #0F1129;
  --ink: #101223;
  --panel: #F5F5F5;
  --track: #dedede;
  --track-hover: #c4c4c4;
  --blue: #6B9CC7;
  --blue-dark: #246AA8;
  --blue-darker: #135086;
  --icon: #08365E;
  --red: #CE463A;
  --green: #46AE24;
  --white: #FFFFFF; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

[hidden] {
  display: none !important; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap; }

/* modularscale.com */
p {
  font-size: 12px; }

h6, .h6 {
  font-size: 9.6px; }

h5 {
  line-height: 1;
  font-size: 15px; }

h4, .h4 {
  font-size: 18.75px;
  line-height: 1; }

h3, .h3 {
  display: block;
  font-size: 23.4375px;
  line-height: 1; }

.bold {
  font-family: "formaatjebold"; }

.center {
  text-align: center; }

.red {
  color: var(--red); }

html {
  display: flex;
  min-width: 320px;
  padding: 12px;
  min-height: 100vh; }

body {
  font-family: "formaatjeregular";
  font-size: 12px;
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  background: var(--navy); }

/* ---------- gekleurde rand ---------- */

[class^="main-border-"] {
  position: fixed;
  z-index: 8; }

.main-border-1 {
  top: 0;
  left: 0;
  width: 100vw;
  height: 12px;
  background: var(--blue); }

.main-border-2 {
  top: 0;
  right: 0;
  width: 12px;
  height: 100vh;
  background: var(--blue); }

.main-border-3 {
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 12px;
  background: var(--red); }

.main-border-4 {
  top: 0;
  left: 0;
  width: 12px;
  height: 100vh;
  background: var(--red); }

/* ---------- logo ---------- */

.menu {
  width: 100%; }
  @media (max-width: 1024px) {
    .menu {
      margin-bottom: 36px; } }
  @media (max-width: 680px) {
    .menu {
      margin-bottom: 56px; } }

.logo {
  margin: 18px;
  width: 279px;
  height: 90px; }
  @media (max-width: 680px) {
    .logo {
      margin-right: 0;
      margin-left: 8px; } }
  .logo text {
    -webkit-user-select: none;
    user-select: none; }

/* ---------- layout ---------- */

.container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 12px solid var(--panel);
  background: var(--panel); }
  @media (max-width: 1024px) {
    .container {
      flex-direction: column;
      align-items: center;
      border: none;
      background: none; } }

/* ---------- canvas ---------- */

.content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 540px;
  height: 540px;
  touch-action: none;
  cursor: grab;
  background: var(--panel); }
  .content.is-dragging {
    cursor: grabbing; }
  @media (max-width: 1024px) {
    .content {
      height: 540px;
      padding: 12px; } }
  @media (max-width: 680px) {
    .content {
      width: calc(100vw - 72px);
      height: calc(100vw - 72px);
      min-height: 0; } }

.canvas-wrap {
  position: relative;
  flex-shrink: 0; }
  .canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%; }
  .is-transparent .canvas-wrap {
    background: repeating-conic-gradient(#d6d6d6 0 25%, var(--white) 0 50%) 0 0 / 16px 16px; }

.grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: difference; }
  .grid line {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 1;
    vector-effect: non-scaling-stroke; }
  .grid[data-mode="1"] .grid__fifths,
  .grid[data-mode="2"] .grid__thirds {
    display: none; }

.toggle-grid {
  position: absolute;
  z-index: 2;
  left: 15px;
  top: 15px;
  color: var(--navy); }
  .toggle-grid:hover {
    color: var(--blue-dark); }
  @media (max-width: 1024px) {
    .toggle-grid {
      left: 27px;
      top: 27px; } }
  @media (max-width: 680px) {
    .toggle-grid {
      left: 7%;
      top: 7%; } }

.drop-hint {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  background: rgba(107, 156, 199, 0.85);
  outline: 4px dashed var(--white);
  outline-offset: -16px; }
  .is-dropping .drop-hint {
    display: flex; }

/* magneten: plak de afbeelding tegen een rand */
.canvas-side {
  position: absolute;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px; }
  .canvas-side svg {
    width: 24px;
    height: 24px; }
  .canvas-side path {
    fill: none;
    transition: transform 0.01s ease-in;
    stroke: var(--white);
    stroke-width: 4;
    stroke-dasharray: 3 1 32 1 3; }
  .canvas-side:hover path,
  .canvas-side:focus-visible path {
    stroke-dasharray: none; }

#canvas-top {
  top: -36px;
  left: 0;
  width: 100%; }
  #canvas-top:hover path {
    transform: translateY(6px); }
  @media (max-width: 680px) {
    #canvas-top {
      left: 33.333%;
      width: 33.333%; } }

#canvas-right {
  right: -24px;
  top: 37.5%;
  height: 25%;
  min-height: 24px; }
  #canvas-right path {
    stroke: var(--navy); }
  #canvas-right:hover path {
    transform: translateX(-6px); }
  @media (max-width: 1024px) {
    #canvas-right {
      right: -36px; }
      #canvas-right path {
        stroke: var(--white); } }
  @media (max-width: 680px) {
    #canvas-right {
      width: 33.333%;
      height: 24px;
      min-height: 0;
      top: -36px;
      right: 0; } }

#canvas-bottom {
  bottom: -36px;
  left: 0;
  width: 100%; }
  #canvas-bottom:hover path {
    transform: translateY(-6px); }

#canvas-left {
  left: -36px;
  top: 0;
  height: 100%; }
  #canvas-left:hover path {
    transform: translateX(6px); }
  @media (max-width: 680px) {
    #canvas-left {
      width: 33.333%;
      height: 24px;
      top: -36px;
      left: 0; } }

/* ---------- opties ---------- */

.options {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  width: 320px;
  height: 540px;
  padding-left: 12px;
  background: var(--panel); }
  @media (max-width: 1024px) {
    .options {
      gap: 14px;
      height: auto;
      border: 12px solid var(--panel);
      margin-top: 60px;
      width: 540px;
      padding-left: 0; } }
  @media (max-width: 680px) {
    .options {
      width: calc(100vw - 72px); } }

#upload-image {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0; }

.upload-image {
  display: flex;
  flex-direction: column;
  text-align: center; }

.upload-image-button {
  cursor: pointer; }

#upload-image:focus-visible + .upload-image-button .button {
  outline: 2px solid var(--blue);
  outline-offset: 2px; }

.upload-hint {
  margin-top: 6px;
  color: #6a6a73; }

/* sliders */
input[type=range].scale-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: var(--track);
  cursor: pointer; }
  input[type=range].scale-slider:hover,
  input[type=range].scale-slider:focus {
    background: var(--track-hover); }
  input[type=range].scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 0;
    background: var(--blue);
    cursor: pointer; }
  input[type=range].scale-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 0;
    background: var(--blue);
    border: none;
    cursor: pointer; }

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield; }
  input[type=number]::-webkit-outer-spin-button,
  input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0; }

.scale-parent {
  margin-right: 12px;
  margin-left: 12px; }

.scale-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px; }

.scale-current {
  margin-left: 12px;
  margin-right: auto;
  -webkit-user-select: none;
  user-select: none; }

.scale-current__info {
  display: flex;
  align-items: baseline;
  margin-top: 2px; }
  .scale-current__info h6 {
    margin-left: 0.25em; }

.scale-value {
  width: 3em;
  font-family: inherit;
  font-size: 12px;
  font-feature-settings: 'tnum';
  text-align: right;
  color: inherit;
  border: none;
  background: transparent; }
  .scale-value:hover,
  .scale-value:focus {
    background: var(--white); }

.scale-origin {
  display: flex;
  flex-direction: column; }

.scale-origin__row {
  display: flex; }
  .scale-origin__row input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0; }
  .scale-origin__row label {
    cursor: pointer;
    margin: 6px;
    width: 10px;
    height: 10px;
    background: var(--track-hover); }
    .scale-origin__row label:hover {
      transform: scale(1.2); }
  .scale-origin__row input:checked + label {
    background: var(--blue);
    transform: scale(1.2); }
  .scale-origin__row input:focus-visible + label {
    outline: 2px solid var(--blue);
    outline-offset: 2px; }

.scale-reset {
  display: flex;
  min-width: 25px;
  min-height: 25px; }

.scale-bar__parent {
  display: flex;
  align-items: center; }

.scale-zoom {
  flex-shrink: 0;
  margin-right: 6px; }

.fit-buttons {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  margin-left: 10px; }

.chip {
  font-family: "formaatjebold";
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  color: var(--ink);
  background: var(--track); }
  .chip:hover {
    color: var(--white);
    background: var(--blue); }

/* eigen formaat */
.custom-size__parent {
  display: flex;
  margin: 0 20px;
  justify-content: space-between;
  align-items: flex-end; }
  @media (max-width: 1024px) {
    .custom-size__parent {
      margin-right: 12px;
      margin-left: 12px; } }
  .custom-size__parent input[type="number"] {
    font-family: inherit;
    font-size: 15px;
    text-align: center;
    font-feature-settings: 'tnum';
    width: 72px;
    height: 36px;
    color: var(--ink);
    background: var(--white);
    border: none;
    box-shadow: inset -1px 1px rgba(0, 0, 0, 0.1); }
  .custom-size__parent .button {
    font-size: 12px;
    line-height: 1;
    width: 100px;
    height: 30px;
    padding-top: 2px;
    padding-bottom: 2px; }
    .custom-size__parent .button:hover {
      padding-top: 4px;
      padding-bottom: 0; }
  .custom-size__parent .size-block p {
    line-height: 1;
    text-align: center;
    margin-bottom: 6px; }

.swap-size {
  height: 36px;
  font-size: 18px;
  color: var(--icon); }
  .swap-size:hover {
    color: var(--blue); }

.canvas-state-indicator {
  text-align: center; }
  .canvas-state-indicator .canvas-state {
    color: var(--red); }
  .canvas-state-indicator.active .canvas-state {
    color: var(--green); }

/* vaste formaten */
.formaten {
  display: grid;
  align-self: center;
  grid-template-columns: repeat(4, 64px);
  grid-auto-rows: 28px; }

.fixed-size-button {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--ink);
  font-feature-settings: 'tnum';
  -webkit-user-select: none;
  user-select: none; }
  .fixed-size-button:hover {
    color: var(--white);
    background: var(--blue); }
  .fixed-size-button.active {
    color: var(--white);
    background: var(--blue-dark); }

/* achtergrond */
.background-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; }
  .background-row input[type=color] {
    width: 32px;
    height: 22px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer; }
    .background-row input[type=color]:disabled {
      opacity: 0.3;
      cursor: default; }

.check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer; }

/* downloaden */
.download__group {
  display: flex;
  gap: 8px;
  margin-top: 12px; }

.btn-download {
  flex: 1; }

.quality-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 12px 0; }
  .quality-row p {
    white-space: nowrap; }
  .quality-row .scale-slider {
    height: 6px; }

.quality-value {
  width: 3em;
  text-align: right;
  font-feature-settings: 'tnum'; }

.status {
  position: absolute;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
  color: var(--ink);
  background: var(--panel); }
  .status:empty {
    display: none; }

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: content-box;
  font-family: "formaatjebold";
  color: var(--white);
  background: var(--blue-dark);
  border-bottom: 2px solid var(--blue-darker);
  padding-top: 1em;
  padding-bottom: 1em;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.01s ease-in-out, padding 0.01s ease-in-out; }
  .button:hover {
    background: var(--blue-darker);
    padding-top: calc(1em + 2px);
    padding-bottom: calc(1em - 2px); }

/* ---------- footer ---------- */

footer {
  align-self: flex-start; }

.schitterende-mogelijkheden {
  display: block;
  text-decoration: none;
  color: var(--white);
  margin: 23px 20px 14px 20px; }
  .schitterende-mogelijkheden h3 {
    line-height: 1.2; }
  .schitterende-mogelijkheden .thumb {
    opacity: 0; }
  .schitterende-mogelijkheden:hover .thumb,
  .schitterende-mogelijkheden:focus-visible .thumb {
    opacity: 1; }
