:root {
  --dutch-red: #ae1c28;
  --dutch-white: #ffffff;
  --dutch-blue: #21468b;

  /* Height of the img and the phrases */
  --wodrcard-header-height: 175px;
}

/* View Transitions for Wordcard */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slide-from-right {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-to-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100px); opacity: 0; }
}

.wordcard {
  display: flex;
  flex-direction:column;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--dutch-red);
  box-shadow: 4px 4px 0 var(--dutch-red);
  margin-bottom: 1rem;
  max-width: 600px; /* So desktop contains the size */
  text-align: center;
  margin-inline: auto;
}

.wordcard-slide {
  view-transition-name: wordcard-slide;
}

::view-transition-old(wordcard-slide) {
  animation: 250ms ease-in both fade-out,
           500ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}

::view-transition-new(wordcard-slide) {
  animation: 250ms ease-out 250ms both fade-in,
           500ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

.wordcard-form {
  display: flex;
  gap: 1rem;
}

.wordcard-visual {
  margin: 0;
  width: 100%;
  flex: 1; /* Images should always try to take most of the space */
}

.wordcard-image {
  width: 100%;
  object-fit: contain;
}

.wordcard-content-text {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--dutch-blue);
  text-wrap: balance;
  min-height: var(--wodrcard-header-height); /* Height doesnt seems to do the trick*/
  max-height: var(--wodrcard-header-height); /* Height doesnt seems to do the trick*/
}

.wordcard-content--numbers {
  font-size: 5em;
}

.wordcard-input-group {
  flex: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

wc-flipper.flipper-figure {
  height: var(--wodrcard-header-height);
}

wc-flipper.flipper-figure::part(front) {
  font-size: 2em;
  color: var(--dutch-blue);
}

wc-flipper.flipper-figure::part(back) {
  font-size: 2em;
}
