/* css/global.css */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.ttf');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Medium.ttf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Bold.ttf');
  font-weight: 700;
  font-style: normal;
}

body, input[type=number] {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
}

body {
  background-color: var(--background-color) !important;
}

html, body, canvas {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
}

:root {
  --background-color: #FAFAFA;
  --main-color: #69A06F;
  --secondary-color: #AFAFAF;
  --tertiary-color: #DBDBDB;
  --quaternary-color: #949494;
  --default-light-color: white;
  --default-dark-color: black;
  --accordeon-button-size: 3px;
  --accordeon-circle-size: 30px;
  --checkmark-border: 5px;
  --rotation-closed-button: 45deg;
  --rotation-open-button: 225deg;
  --footer-height: 75px;
  --editor-width: 70%;
  --input-container-margin: 15px;
  --last-step-padding: 50px;
}

h2, h3, h4 {
  color: var(--main-color);
}

h3 {
  font-weight: 700;
}

h4 {
  margin-bottom: 0;
}

.medium {
  font-weight: 500;
}

label {
  margin-top: 1em;
}

.tooltip {
  top: 0;
  left: 0;
  position: absolute;
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1000;
}

/* #region 3D Canvas sizing */

#gjs {
  height: calc(100% - var(--footer-height));
}

#canvas-container {
  height: 100%;
  width: var(--editor-width);
  transition: 1s width;
}

#canvas-container.full-width {
  width: 100%;
}

/* #endregion */

/* #region Generic Checkmarks */
.radio-input-container input[type="radio"]:checked, #footer .footer-section-button .footer-checkmark {
  border: none;
  background-color: var(--main-color);
  cursor: default;
  border-radius: 100%;
}

.radio-input-container input[type="radio"]::after, #footer .footer-section-button .footer-checkmark::after {
  content: "";
  width: calc(var(--accordeon-circle-size) / 4);
  height: calc(var(--accordeon-circle-size) / 2);
  border-bottom: var(--checkmark-border) solid var(--default-light-color);
  border-right: var(--checkmark-border) solid var(--default-light-color);
  transform: rotate(45deg) scale(0.75) translateY(calc(-1 * var(--accordeon-circle-size) / 25));
  display: flex;
  justify-content: center;
  margin: calc(var(--accordeon-circle-size) / 25) calc(var(--accordeon-circle-size) / 5);
  opacity: 0;
  transition: opacity 1s;
}

/* #endregion */

/* #region Generic arrow style */

#footer .footer-arrow::after, #input-container-tongue::after {
  content: "";
  height: 25px;
  width: 25px;
  border-bottom: solid 3px var(--secondary-color);
  border-right: solid 3px var(--secondary-color);
  display: block;
  transition: transform 1s;
}

/* transformations applied to the "previous" arrow */
.footer-arrow[data-action="-1"]::after, #input-container-tongue::after {
  transform: translate(90%, 75%) rotate(135deg);
}

/* transformations applied to the "next" arrow */
.footer-arrow[data-action="1"]::after, #input-container-tongue.open::after {
  transform: translate(50%, 75%) rotate(-45deg);
}

/* #endregion */

/* #region Main input container */

#input-container-tongue, #input-container {
  position: fixed;
  background-color: var(--default-light-color);
  transition: right 1s;
}

#input-container-tongue {
  top: 50%;
  transform: translateY(-100%);
  height: 75px;
  width: 50px;
  cursor: pointer;
}

#input-container {
  right: calc(-100% + var(--editor-width));
  top: 0;
  margin: var(--input-container-margin) 0;
  padding: 0;
  height: calc(100% - var(--footer-height) - 2 * var(--input-container-margin));
  width: calc(100% - var(--editor-width) - 2 * (var(--input-container-margin)));
  padding: 0 var(--input-container-margin);
  overflow-y: auto;
}

.input-container-section, .sub-radio {
  display: none;
}

.input-container-section.active, .sub-radio.active {
  display: block;
}


#input-container-tongue.open {
  right: calc(100% - var(--editor-width));
}

#input-container-tongue.open::after {
  transform: translate(12%, 75%) rotate(-45deg);
}

#input-container.open, #input-container-tongue {
  right: 0;
}

#input-container-tongue::after {
  transform: translate(60%, 75%) rotate(135deg);
}

/* #endregion */

/* #region Last Step Container */

#last-step-container {
  top: 0;
  left: 100%;
  position: fixed;
  background-color: var(--default-dark-color);
  color: var(--default-light-color);
  padding: var(--last-step-padding) calc(2 * var(--last-step-padding)) var(--last-step-padding) var(--last-step-padding);
  width: calc(100% - var(--editor-width));
  height: calc(100vh - var(--footer-height) - 2 * var(--last-step-padding));
  transition: left 1s;
}

#last-step-container.last-step {
  left: calc(var(--editor-width) - 2 * var(--last-step-padding));
}

#totals-row, .subtotals-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

#totals-row {
  text-transform: uppercase;
  font-weight: bold;
}

.last-step-sub-attribute-container {
  display: flex;
  flex-wrap: wrap;
}

.last-step-sub-attribute {
  padding-right: calc(0.2 * var(--editor-width));
}

/* #endregion */

/* #region Number input */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

input[type=number] {
  text-align: center;
  height: 2em;
  width: 4em;
  border: 0;
  padding: 0;
  
}

.quantity-input-container button {
  border-radius: 0;
  border: 0;
  padding: 0;
  background-color: var(--default-light-color);
  height: 2em;
  width: 2em;
  font-size: 1em;
  padding-bottom: 2px;
  cursor: pointer;
}

/* #endregion */

/* #region  Radio Input */
.radio-input-container {
  display: block;
  position: relative;
  min-height: 100px;
  height: auto;
}

.radio-input-container input[type="radio"] {
  /* Add if not using autoprefixer */
  -webkit-appearance: none;
  appearance: none;
  /* For iOS < 15 to remove gradient background */
  background-color: #fff;
  /* Not removed via appearance */
  margin: 0;

  font: inherit;
  color: #AFAFAF;
  width: 1.4em;
  height: 1.4em;
  border: 1px solid #AFAFAF;
  border-radius: 50%;
  margin-right: 10px;
  margin-bottom: -3px;
  cursor: pointer;
  transition: background-color 1s;
}

.radio-input-container input[type="radio"]:checked {
  transform: scale(1.2);
}

.radio-input-container input[type="radio"]:checked::after {
  opacity: 1;
}

/* #endregion */

/* #region Circle Accordeon */

.accordeon-input-title {
  display: flex;
  justify-content: space-between;
}

.accordeon-input-title h3 {
  margin-bottom: 0;
}

.accordeon-button {
  margin-top: 1em;
  margin-left: 1em;
  cursor: pointer;
}

.accordeon-button {
  width: var(--accordeon-button-size);
  height: var(--accordeon-button-size);
  border: solid var(--default-dark-color);
  border-width: 0 var(--accordeon-button-size) var(--accordeon-button-size) 0;
  display: inline-block;
  padding: 5px;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  transition: transform 0.5s;
}

.accordeon-input-container.open .accordeon-button {
  transform: rotate(225deg);
  -webkit-transform: rotate(225deg);
}

.accordeon-input-circles-container {
  display: flex;
  flex-wrap: wrap;
  height: 0;
  width: 98%;
  margin-top: 10px;
  transition: height 0.5s;
}

.accordeon-input-circle {
  height: var(--accordeon-circle-size);
  width: var(--accordeon-circle-size);
  border: solid var(--secondary-color) 1px;
  border-radius: 100%;
  margin-right: calc(var(--accordeon-circle-size) / 2);
  margin-top: calc(var(--accordeon-circle-size) / 3);
  opacity: 0;
  transition: opacity 1s, transform 1s;
  cursor: pointer;
}

/* selected input circle size */
.accordeon-input-circle.selected {
  transform: scale(1.2);
  cursor: default;
}


/* checkmark inside input circle */
.accordeon-input-circle::after {
  content: "";
  width: calc(var(--accordeon-circle-size) / 4);
  height: calc(var(--accordeon-circle-size) / 2);
  border-bottom: var(--checkmark-border) solid var(--default-dark-color);
  border-right: var(--checkmark-border) solid var(--default-dark-color);
  transform: rotate(45deg) scale(0.85);
  display: flex;
  justify-content: center;
  margin: calc(var(--accordeon-circle-size) / 10) calc(var(--accordeon-circle-size) / 3.5);
  opacity: 0;
  transition: opacity 1s;
}

.accordeon-input-circle.selected::after {
  opacity: 1;
}

/* #endregion */

/* #region Dotted borders */
.accordeon-input-container, .radio-input-container, .last-step-attribute {
  padding-bottom: 20px;
  background-image: linear-gradient(to right, var(--secondary-color) 25%, rgb(0,0,0,0) 0%);
  background-position: bottom;
  background-size: 8px 2px;
  background-repeat: repeat-x;
}

.sub-radio {
  padding-left: 20px;
  background-image: linear-gradient(to bottom, var(--secondary-color) 25%, rgb(0,0,0,0) 0%);
  background-position: left;
  background-size: 2px 8px;
  background-repeat: repeat-y;
}

.sub-radio-input-container {
  display: grid;
  grid-template-columns: auto auto;
}

/* #endregion */

/* #region Footer */

#footer {
  position: fixed;
  left: 0;
  bottom: 0;
}

#footer, #footer-in-editor, #footer-out-of-editor {
  display: flex;
  width: 100%;
  min-height: var(--footer-height);
  justify-content: space-between;
}

#footer-in-editor {
  max-width: var(--editor-width);
}

#footer-out-of-editor {
  max-width: calc(100% - var(--editor-width));
}

#footer .footer-arrow {
  min-height: var(--footer-height);
  width: 70px;
  background-color: var(--tertiary-color);
  cursor: pointer;
}

/* disabilitation of the arrows */
#footer .footer-arrow.disabled {
  opacity: 0.5;
  cursor: default;
}

#footer .footer-section-button, #footer .footer-price, #footer .footer-add-to-cart, #footer #footer-finish-payment {
  display: flex;
  align-items: center;
  justify-content: center;
}

#footer .footer-section-button {
  color: var(--secondary-color);
  background-color: var(--default-light-color);
  cursor: pointer;
}

#footer .footer-section-button, #footer #footer-out-of-editor div:not(.footer-arrow) {
  flex: 1 0 0;
  margin: 0 1px 1px;
}

#footer .footer-arrow::after {
  background-color: var(--tertiary-color);
}

#footer .footer-section-button .footer-checkmark {
  width: 25px;
  height: 25px;
  margin-right: 10px;
}

#footer .footer-section-button.selected {
  color: var(--default-light-color);
  background-color: var(--default-dark-color);
}

#footer .footer-section-button.selected .footer-checkmark {
  background-color: var(--default-light-color);
}

#footer .footer-section-button .footer-checkmark::after {
  opacity: 1;
}

#footer .footer-section-button.selected .footer-checkmark::after {
  border-bottom: var(--checkmark-border) solid var(--default-dark-color);
  border-right: var(--checkmark-border) solid var(--default-dark-color);
}

#footer .selected ~ .footer-section-button .footer-checkmark {
  opacity: 0;
}

#footer .footer-price {
  background-color: var(--tertiary-color);
  color: var(--main-color);
  font-weight: 500;
  font-size: 25px;
}

#footer .footer-add-to-cart {
  font-size: 15px;
  color: var(--default-light-color);
  background-color: var(--main-color);
}

#footer .footer-add-to-cart {
  background-color: var(--main-color);
  cursor: pointer;
}

#footer .footer-add-to-cart, #footer #footer-finish-payment {
  text-transform: uppercase;  
  color: var(--default-light-color);
}

#footer #footer-finish-payment {
  background-color: var(--default-dark-color);
  position: fixed;
  left: 100%;
  transition: all 1s;
  height: var(--footer-height);
}

#footer #footer-finish-payment.final-step {
  transform: translateX(-100%);
}

/* #endregion */