/* Style overrides and adjustments. ***************************************** */
/* ************************************************************************** */

/* Lightswitch ************************************************************** */
/* ************************************************************************** */

.lightswitch-container {
  height: 100%;
  display: table;
  float: right;
}

.lightswitch {
  display: table-cell;
  vertical-align: middle;
}

html[data-theme="dark"] .show-on-light {
  display: none;
}

html:not([data-theme="dark"]) .show-on-dark {
  display: none;
}

/* Modal ******************************************************************** */
/* ************************************************************************** */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;

  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: rgba(var(--main-bg), 1);
  color: rgba(var(--main-text-color), 1);
  margin: 30% auto;
  padding: 20px;
  border-radius: 4px;
  max-width: 90%;
}

.invisible {
  display: none !important;
}

.adjust-canvas {
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 4px;

  max-width: 600px;
  width: 100%;

  cursor: move;
  cursor: grab;
  cursor: -moz-grab;
  cursor: -webkit-grab;
}

.adjust-canvas:active {
  cursor: grabbing;
  cursor: -moz-grabbing;
  cursor: -webkit-grabbing;
}

.adjust-range {
  width: 100%;
}

/* File Input *************************************************************** */
/* ************************************************************************** */

.file-input {
  display: flex;
  margin: 0.1rem;
  background-color: rgba(var(--main-bg), 1);
  border-radius: var(--default-border-radius);
}

.file-input input[type="file"] {
  display: none;
}

.file-input .file-input-label {
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;

  margin-bottom: 0.1rem;
  padding: 0.5rem 1rem;
  
  border-top-left-radius: var(--default-border-radius);
  border-bottom-left-radius: var(--default-border-radius);
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  transition: 0.2s ease all;

  color: #fff;
  background-color: rgba(var(--primary-bg-color), 1);
}

.file-input .file-input-info {
  display: inline-block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: var(--default-border-radius);
  border-top-right-radius: var(--default-border-radius);

  margin-bottom: 0.1rem;
  padding: 0.5rem 1rem;
  background-color: rgba(var(--ligth-bg-color), 1);
}

/* Colour Input ************************************************************* */
/* ************************************************************************** */

input[type="color"] {
  display: none;
}

.colour-label {
  cursor: pointer;
  display: inline-block;
  box-sizing: border-box;

  margin: 0rem 0.1rem;
  padding: 0.5rem 1rem;
  
  border-radius: var(--default-border-radius);
  border: 1px solid rgba(var(--ligth-bg-color), 1);
}

.colour-info {
  filter: invert(100%);
}

/* Progressbar ************************************************************** */
/* ************************************************************************** */

progress {
  -moz-appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 9999px;
  display: block;
  height: 1rem;
  overflow: hidden;
  padding: 0;
  width: 100%;
  background-color: rgba(var(--ligth-bg-color), 1);
}

progress::-webkit-progress-bar {
  background-color: rgba(var(--ligth-bg-color), 1);
}

progress::-webkit-progress-value {
  background-color: rgba(var(--action-bg-bg-color), 1);
}

progress::-moz-progress-bar {
  background-color: rgba(var(--primary-bg-color), 1);
}

progress::-ms-fill {
  background-color: rgba(var(--primary-bg-color), 1);
  border: none;
}

/* Preview Elements ********************************************************* */
/* ************************************************************************** */
.previews {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.previews .preview {
  width: 200px;
  padding: 10px;
  display: flex;
  align-items: center;
  flex-direction: column;

  padding: 10px;
  border-radius: 4px;

  flex-grow: 0;
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
}

.previews .preview img {
  width: 100%;
}

.previews .preview .button {
  width: 100%;
  margin-top: 4px;
}

.preview-canvas {
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  width: 350px;
  height: 350px;
}

@media screen and (max-width: 1280px) {
  .preview-canvas {
    width: 256px;
    height: 256px;
  }
}

/* Footer ******************************************************************* */
/* ************************************************************************** */
html,
body {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.spacer {
  flex-grow: 1;
  margin-top: 8px;
}

footer {
  margin-top: auto;
}