@font-face {
  font-family: "Minecraftia";
  src: url("/assets/Minecraftia.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.color-pallete-container {
  flex: 1;
}

.color-dropdownmenu {
  display: flex;
  user-select: none;
  flex-direction: row;
  align-content: center;
  color: var(--text-muted);
  gap: 3.5px;
  font-size: .8em;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 15px;
}

.color-dropdownmenu i {
  align-self: center;
  font-size: 1.8em;
  transition: transform .3s;
}

.color-dropdownmenu .active {
  transform: rotate(180deg);
}

.color-dropdownmenu p {
  align-self: center;
}

.colors-grid-container {
  display: grid;
  visibility: hidden;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms, visibility 300ms;
}

.colors-grid-container div {
  overflow: hidden;
}

.colors-grid-container.show {
  visibility: visible;
  grid-template-rows: 1fr;
}

.colors-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

@keyframes expandIn {
  from {
    grid-template-rows: 0fr;
  }
  to {
    grid-template-rows: 1fr;
  }
}
@keyframes contractOut {
  from {
    grid-template-rows: 1fr;
  }
  to {
    grid-template-rows: 0fr;
  }
}

.color-container {
  position: relative;
  display: grid;
  border-radius: 15px 15px 0 15px;
  padding: .7em;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(0deg, var(--bg), var(--bg-light));
  box-shadow: 0 2px 2px var(--shadow);
}

.color-container.disabled {
  pointer-events: none;
  border: 1px dashed var(--border);
  opacity: .5;
}

.color-container.disabled .color-error-message {
  display: block;
}

.color-container.disabled .delete-icon {
  pointer-events: auto;
}

.color-error-message {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate( -50%, -50% );
  font-size: 1em;
  text-align: center;
  color: var(--text-muted);
  padding: .3em;
  border-radius: 2em;
  background-color: var(--bg-light);
}

.color-container div {
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: row;
}

.pcr-button {
  height: 60px !important;
  width: 60px !important;
}

.pcr-save {
  background-color: springgreen !important;
}

.color-name-container {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 25px;
  flex-direction: row;
}

.color-name-container i {
  display: flex;
  color: var(--text);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  user-select: none;
  transition: background-color .5s;
}

.color-name-container i:hover {
  background-color: var(--hover);
}

.color-name {
  display: flex;
  font-weight: bold;
  color: var(--primary);
}

.delete-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  color: var(--text);
  border-top-left-radius: 5px;
  padding: 5px;
  cursor: pointer;
  transition: background-color 300ms;
}

.movers-container {
  position: absolute;
  top: 0;
  right: 0;
  border-bottom-left-radius: .5em;
  background-color: var(--bg-light);
  display: flex;
  flex-direction: column !important;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.mover {
  padding: .3em;
  color: var(--text-muted);
  cursor: pointer;
  transition: transform ease .5s;
}

.mover:hover {
  transform: scale(.9);
}

.delete-icon:hover {
  background-color: var(--danger);
}

.error-message {
  color: var(--danger);
  font-size: .8em;
  font-weight: bold;
  padding: 1em;
  display: none;
  text-align: center;
}

.addColor-btn {
  width: 100%;
  height: 75px;
  padding: 10px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 15px;
  color: var(--text-muted);
  background-color: var(--bg);
  border: 1px dashed var(--text-muted);
}

.addColor-btn.deselect {
  cursor: none;
  opacity: .5;
}

.styler-container {
  display: flex;
  flex-direction: row;
  gap: .5em;
  justify-content: center;
  margin-bottom: 1em;
}

.styler-label {
  position: relative;
  color: var(--text);
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.styler-label .icon {
  position: absolute;
  display: flex;
  justify-self: center;
  align-self: center;
  font-size: 1em;
}

.stylers {
  appearance: none;
  border-radius: .4em;
  padding: 1em;
  background-color: var(--bg);
  box-shadow: 0 4px 4px var(--shadow);
  border: 1px solid var(--border-muted);
  transition: .5s all;
}

.stylers:checked {
  box-shadow: 0 2px 2px var(--shadow);
  border-bottom-width: .3em;
}
.stylers:checked ~ .icon {
  color: var(--primary);
}

.preview-screen-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: hidden;
  margin: .7em 0;
}

.preview-header {
  padding: 1em;
  color: var(--text);
  font-weight: bold;
  font-size: .6em;
  background-color: var(--bg-light);
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
  z-index: 2;
  box-shadow: 0 4px 8px var(--shadow);
}

.preview-screen {
  display: flex;
  padding: 1em;
  background-color: var(--bg);
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 15px;
  box-shadow: 0 2px 2px var(--shadow);
}

.preview-text {
  position: relative;
  
  font-family: "Minecraftia", monospace;
  font-size: 1.7em;
  overflow-wrap: break-word;
  
  image-rendering: pixelated;
  font-smooth: never;
  -webkit-font-smoothing: none;
}

.preview-text span {
  display: inline-block;
  white-space: pre;
  position: relative;
  margin-right: -0.5px;
  z-index: 1;
}

.preview-text span::selection {
  color: white;
  background: rgba(51, 144, 255, 0.4);
}

.preview-text .bold::selection {
  text-shadow: 
  /* Bold effect */
  2px 0 0 white,
  3.5px 0 0 white,
  9.5px 6px 0 color-mix(in srgb, currentColor 10%, transparent) !important;
}

.preview-text .bold {
  letter-spacing: 3px;
  text-shadow: 
  /* Bold effect */
  2px 0 0 currentColor,
  3.5px 0 0 currentColor,
  9.5px 6px 0 color-mix(in srgb, currentColor 10%, transparent) !important;
}

.preview-text:has(.italic) {
  transform: skewX(-8deg);
  transform-origin: bottom left;
}

.preview-text .underline::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: currentColor;
  box-shadow: 6px 6px 0 color-mix(in srgb, currentColor 10%, transparent);
}
/* FIX: underline being too close to text on bold */
.preview-text:has(.bold, .underline) .underline::after {
  bottom: 1px !important;
}

.preview-text .strike-through::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  transform: translateY(1px);
  background: currentColor;
  z-index: 2;
  box-shadow: 6px 6px 0 color-mix(in srgb, currentColor 10%, transparent);
}

.results-container {
  display: flex !important;
  margin-top: .5em !important;
  margin-bottom: 1em;
}

@media (prefers-reduced-motion: reduce) {
  .color-container {
    transition: none !important;
    animation: none !important;
  }
}