:root {
  --vdir-color-primary: #ffcd30;
  --vdir-color-accent-1: #ff8f00;
  --vdir-color-bad: #fd8787;
  --vdir-color-medium: #ffdd6a;
  --vdir-color-good: #79f579;
  --vdir-textcolor-good: #168716;
  --vdir-textcolor-medium: #a16913;
  --vdir-textcolor-bad: #8d0707;
}

.vdir {
  min-height: 3rem;
  padding: 1rem;
  container-type: inline-size;
  width: 100%;
  max-width: 100%!important;
  border-radius: 0.3rem;
  box-shadow: 0 0 3rem rgba(0,0,0,0.1);
  background-color: white;
}
.vdir-app {
  container-type: inline-size;
}
.vdir-box {
  border: 1px solid black;
  padding: 1rem;
}
.vdir-field-suffix {
  line-height: 29px;
  opacity: 0.8;
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
}
.vdir-field-suffix.is-big {
  font-weight: bold;
  color: black;
  top: 0.5rem;
}
.vdir-help {
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.8;
}
.vdir-box h4 {
  margin-top: 0;
  font-weight: bold;
}
.vdir-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}
.vdir-form-row {
  margin-top: 0.8rem;
  position: relative;
}
.vdir-form-row-full {
  grid-column: span 2;  
}
.vdir-form-row-empty {
  margin-top: 0;
}

.vdir-label, .vdir-switcher > label {
  display: inline-block;
  font-weight: bold;
  font-size: 0.9rem;
  line-height: 1.2em;
}
.vdir-label.is-label-big {
  font-size: 1.2rem;
}
.vdir-switcher{
  text-align: center;
  overflow: hidden;
  position: relative;  
  line-height: 1em;
}
.vdir-switcher > label {
  display: flex;
  cursor: pointer;
}
.vdir-switcher > label:active {
  transform: scale(0.98);
}
.vdir-centered-field {
  display: flex;
  justify-content: center;
}

.vdir-switcher input{
  position: absolute;
  left: -3rem;
}
.vdir-switcher b,
.vdir-switcher i {
  display: inline-block;
  font-style: normal;
  font-weight: bold;
  border: 1px solid grey;
  padding: 0.3rem 0.5rem;
  background-color: #e5e5e5;
  color: #737379;
}
.vdir-switcher b {
  background-color: var(--vdir-color-primary);
  color: black;
  border-color: black;
}
.vdir-switcher i {
  margin-left: -1px;
}
.vdir-switcher > label:has(:checked) i{
  background-color: var(--vdir-color-primary);
  color: black;
  border-color: black;
}
.vdir-switcher > label:has(:checked) b{
  background-color: #e5e5e5;
  color: #737379;
  border-color: grey;
}
.vdir-form-control {
  margin-top: 0.4rem;
  position: relative;
}
.vdir-form-control-percent {
  display: flex;
  justify-content: space-between;
}
.vdir-form-control-percent > * {
  flex-grow: 0;
  flex-shrink: 0;  
}
.vdir-form-control-percent > *:first-child {
  width: 35%;
}
.vdir-form-control-percent > *:last-child {
  width: 60%;
}
.vdir-min-max {
  display: flex;
  justify-content: space-between;
}
.vdir-min-max > * {
  width: 48%;
}
.vdir-min-max label {  
  font-size: 0.9rem;
  line-height: 1.2em;
}
.vdir-min-max .vdir-form-control {
  margin-top: 0;
}

/* Form inputs */
.vdir fieldset {
  border: 0 none;
  padding: 0;
}
.vdir input[type=range]{
  width: 100%;
}
.vdir input[type=range] {
  margin-top: 1rem;
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;  
  background: var(--vdir-color-primary);
  border-color: var(--vdir-color-primary)!important;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.vdir input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%; 
  background: var(--vdir-color-accent-1);
  border: 2px solid #d30000;
  cursor: pointer;
}

.vdir input[type=range]::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--vdir-color-accent-1);
  cursor: pointer;
}
.vdir input[type=text]{
  padding: 0.5rem;
  border: 1px solid #d5d5d5;
  background-color: white;
  font-size: 1rem;
  font-family: var(--wp--preset--font-family--body);
  border-radius: 0.2rem;
  font-weight: 500;
  display: block;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}
.vdir input[type=text].is-big {
  font-size: 1.3rem;
  font-weight: bold;
  color: black;
}
.vdir input[type=text].is-centered {
  text-align: center;
}
.vdir input[readonly],
.vdir input[disabled]{
  background-color: #f5f5f5;
  border: 1px solid #f5f5f5;
  color: black;
}
.vdir input[data-vdir-color="3"]{
  background-color: var(--vdir-color-good);
  border-color: var(--vdir-color-good);
  color: var(--vdir-textcolor-good);
}
.vdir input[data-vdir-color="2"]{
  background-color: var(--vdir-color-medium);
  border-color: var(--vdir-color-medium);
  color: var(--vdir-textcolor-medium);
}
.vdir input[data-vdir-color="1"]{
  background-color: var(--vdir-color-bad);
  border-color: var(--vdir-color-bad);
  color: var(--vdir-textcolor-bad);
}

/* Accordion*/
.vdir-accordion-item {
  padding: 0;
  border: 1px solid #aaa;
  margin-top: -1px;
  background-color: white;
}
.vdir-accordion-title {
  display: block;
  cursor: pointer;
  padding: 0.8rem 1rem;
  padding-right: 2rem;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  background: var(--vdir-color-primary);
  color: black;
  border: 0 none;
  font-weight: bold;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.2em;
  position: relative;
}
.vdir-accordion-title:active {
  background: #fafafa;
}
.vdir-accordion-title b {
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 0.4rem 0.3rem 0 0.3rem;
  border-color: #888a8d transparent transparent transparent;
  transform: rotate(0deg);
  position: absolute;
  right: 1rem;
  top: 1.2rem;
}
.vdir-accordion-item.is-opened .vdir-accordion-title b{
  transform: rotate(180deg);
}
.vdir-accordion-content {
  display: none;
  padding: 1rem 2rem 2rem;
  border-top: 1px solid #cececf; 
}
.vdir-accordion-item.is-opened .vdir-accordion-content {
  display: block;
}

/* Floater Tooltip */
.vdir-floater {
  position: relative;
  display: inline-block;
  width: 1rem;
  height: 1rem;
}
.vdir-floater > div {
  display: none;
  position: absolute;
  top: 0;
  left: 1.2rem;
  background: rgba(0,0,0,0.8);
  color: white;
  width: 10rem;
  height: auto;
  font-size: 0.8rem;
  border-radius: 0.3rem;
  padding: 0.5rem;
  z-index: 8;
  line-height: 1.1em;
}
.vdir-floater>span:hover + div {
  display: block;
}
.vdir-floater > span {
  display: inline-block;
  font-family: var(--wp--preset--font-family--body);
  font-weight: bold;
  font-size: 0.7rem;
  width: 1rem;
  height: 1rem;
  padding: 0;
  line-height: 1rem;
  text-align: center;
  background-color: black;
  color: white;
  border-radius: 50%;
  cursor: help;
  text-decoration: none;
  border: 0 none;
}

.vdir-form-paragraph{
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.vdir-form-paragraph:first-child{
  margin-top: 0;
}

.vdir-form-group {
  margin-top: 2rem;
}

.vdir-group-title {
  display: none;
  color: white;
  background: var(--vdir-color-primary);
  font-size: 1.4rem;
  text-align: center;
  padding: 0.3rem;
  margin-top: 3rem;
  font-weight: bold;
}

.vdir__calcName {
  font-size: 2rem;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.8rem;
}
.vdir__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.vdir__logo img {
  width: 120px;
  font-size: 10px;
  line-height: 1;
}

.vdir-centered-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* SHARE BOX */
.vdir__shareBox {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 0.2rem;
  background:#d5d8d9;
  font-size: 0.8rem;
  width: 100%;
}
.vdir__shareBox__share{
  padding-right: 1rem;
  font-weight: bold;
}
.vdir__shareBox__urlBox {
}
.vdir__shareBox__urlBox input[type=text] {
  font-size: 0.8rem;
  height: 2.5rem;
  box-sizing: border-box;
  background: #f1f1f1;
  width: 100%;
  display: block;
  border: 0 none;
}
.vdir__shareBox img{
  max-width: 80%;
  display: block;
  margin: 0 auto;
}
.vdir__shareBox__urlBox {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
}
.vdir__shareBox__urlBox button {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  flex-grow: 0;
  cursor: pointer;
  border: 0 none;
  background: transparent!important;
  appearance: none!important;
  padding: 8px;
}
.vdir__shareBox__urlBox button:active img {
  transform: scale(0.8);
}
.vdir__shareBox__socialBox {
  padding-left: 0.5rem;
  display: flex;
}
.vdir__shareBox__socialBox button {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  flex-grow: 0;
  margin-left: 0.5rem;
  cursor: pointer;
  border: 0 none;
  background: #e5e5e5!important;
  appearance: none!important;
  border-radius: 0.2rem;
  padding: 8px;
}
.vdir__shareBox__socialBox button:active img {
  transform: scale(0.8);
}


/* ===== MEDIA QUERY ===== */

@media (max-width: 768px){
  .vdir-floater > div {
    top: auto;
    left: -5rem;
    bottom: 0.8rem;
  }
}

@container (max-width: 640px) {
}
@container (max-width: 480px) {
  .vdir-form-grid {
    grid-template-columns: 1fr;
  }
  .vdir-accordion-content {
    padding: 0.5rem 1.5rem 1rem;
  }
  .vdir-form-row-full {
    grid-column: 1;
  }
}

