:root {
  --vdim-color-primary: #ffcd30;
  --vdim-color-accent-1: #ff8f00;
}

.vdim.vdimp-container{
    box-shadow: none;
}

.vdimp-form {
	padding: 2rem;
	box-shadow: 0 0 3rem rgba(0,0,0,0.1);
	max-width: 630px;
	margin: 0 auto;
	border-radius: 15px;
}

.vdim__calcName {
  font-size: 2rem;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.8rem;
}
.vdim__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.vdim__logo img {
  width: 120px;
  font-size: 10px;
  line-height: 1;
}
.vdim__formGrid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1rem 2rem;
  border: 0 none;
  padding: 0;
  width: 61%;
  margin: 0 auto;
}
.vdim__typeSelector{
  margin-bottom: 2rem;
}
.vdim__typeSelector select{
  font-weight: bold;
}
.vdim__formGrid label {
  opacity: 0.7;
  font-size: 0.9rem;
}

.vdim__formCell {
  /* fix issue with Elementor */
  min-width: 10px;
}

.vdim__formCellHalf {
  grid-column: span 2;
}
.vdim__formCellFull {
  grid-column: span 4;
}

.vdim__formFooter {
  display: flex;
  justify-content: flex-end;
}
.vdim__formControl {
  display: flex;
  height: 2.4rem;
  align-items: center;
  position: relative;
}
.vdim__suffix {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: black;
  font-size: 1.2rem;
  pointer-events: none;
  font-weight: bold;
padding: 4px;

}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}
.vdim__formControl > input[type=text],
.vdim__formControl > input[type=number],
.vdim__formControl > select {
  border: 1px solid var(--vdim-color-primary);
  background: white;
  font-family: inherit;
  color: black;
  flex-grow: 1;
/*  height: 100%;
  padding: 0 0.5rem;*/
  display: block;
  /*font-size: 1rem;*/
  max-width: 100%;
  font-weight: 500;
}
.vdim__formControl > input[type=text]:disabled,
.vdim__formControl > input[type=number]:disabled {
  border-color: #e3e3e3;
  background-color: #f3f3f3;
  cursor: not-allowed;
}

.vdim__range {
  margin-top: 1rem;
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;  
  background: var(--vdim-color-primary);
  border-color: var(--vdim-color-primary)!important;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.vdim__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%; 
  background: var(--vdim-color-accent-1);
  border: 2px solid #d30000;
  cursor: pointer;
}

.vdim__range::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--vdim-color-accent-1);
  cursor: pointer;
}

.vdim__button {
  background: var(--vdim-color-primary);
  box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  color: white;
  font-weight: bold;
  border: 0 none;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  transition: background-color .2s;
}
fieldset[disabled] .vdim__button {
  cursor: not-allowed;
  opacity: 0.5;
}
fieldset[disabled] .vdim__button:hover {
  background: var(--vdim-color-primary);
}


.vdim__resultBox {
  min-height: 2rem;
}
.vdim__result {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 2px solid #c4c9cb;
  padding-top: 3rem;
  margin-top: 3rem;
  width: 100%;
  margin: 60px auto 0;
}

/* DISPLAY MODE */
.vdim__displayMode {
  display: flex;
  justify-content: flex-start;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.vdim__displayMode > label {
  cursor: pointer;
  display: block;
  border: 1px solid var(--vdim-color-primary);
  width: auto;
  padding: 0.2rem 1rem;
}
.vdim__displayMode > label:first-child {
  border-radius: 0.2rem 0 0 0.2rem;
}
.vdim__displayMode > label:last-child {
  margin-left: -1px;
  border-radius: 0 0.2rem 0.2rem 0;
}
.vdim__displayMode > label:has(input:checked) {
  background: var(--vdim-color-primary);
  color: white;
}

/* SHARE BOX */
.vdim__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%;
}
.vdim__shareBox__share{
  padding-right: 1rem;
  font-weight: bold;
}
.vdim__shareBox__urlBox {
}
.vdim__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;
}
.vdim__shareBox img{
  max-width: 80%;
  display: block;
  margin: 0 auto;
}
.vdim__shareBox__urlBox {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
}
.vdim__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;
}
.vdim__shareBox__urlBox button:active img {
  transform: scale(0.8);
}
.vdim__shareBox__socialBox {
  padding-left: 0.5rem;
  display: flex;
}
.vdim__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;
}
.vdim__shareBox__socialBox button:active img {
  transform: scale(0.8);
}

/* RESULT TEXT */
.vdim__resultText {
  box-sizing: border-box;
  margin-bottom: 2rem;
  line-height: 1.2em;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4,1fr);
  width: 100%;
}
.vdim__resultTextItem {  
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.2em;
}
.vdim__resultTextBig {
  font-weight: bold;
  font-size: 1.7rem;
  color: var(--vdim-color-accent-1);
  margin-bottom: 0.5rem;
  line-height: 1.4em;
  white-space: nowrap;
}


.vdim__resultPie {
  width: 40%;
}
.vdim__resultBar {
  width: 100%;
  margin-top: 2rem;
  position: relative;
  display: block;
  aspect-ratio: 500/200;
}
.vdim__resultTable {
  width: 100%;
  margin-top: 3rem;
  overflow: auto;
}
.vdim__pieLegend {
  font-size: 0.9rem;
}
.vdim__pieLegend > span {
  display: flex;
}
.vdim__pieLegend i {
  display: block;
  width: 1.2rem;
  height: 1rem; 
}
.vdim__pieLegend td {
  padding-right: 1rem;
}

.vdim__table{
  border-collapse: collapse;
  width: 100%;
}
.vdim__table td,.vdim__table th{
  border: 1px solid #cecece;
  line-height: 1.1;
  text-align: left;
  padding: 0.4rem 0.2rem;
  font-size: 0.9rem;
  transition: background-color .2s;
}
.vdim__table tr:hover td {
  background: #fff0c3;
}
.vdim__tableMonthly tr:nth-child(12n+1) td {
  background: #e9f7f7;
}
.vdim__hspace {
  border-bottom: 1px solid #cecece;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.vdim__spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  min-height: 48px;
}
.vdim__spinner::before {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  border: 5px solid var(--vdim-color-accent-1);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: vdim__rotation 1s linear infinite;
  }
@keyframes vdim__rotation {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
} 

@container (max-width: 860px) {
  .vdim__formGrid {
    grid-template-columns: repeat(2,1fr);
  }
  .vdim__formCellHalf {
    grid-column: span 1;
  }
  .vdim__formCellFull {
    grid-column: span 2;
  }
}
@container (max-width: 640px) {
  .vdim__resultText {    
    grid-template-columns: repeat(2,1fr);
    gap: 2rem 1rem;
  }
}
@container (max-width: 540px) {
  .vdim__formGrid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .vdim__formCellFull {
    grid-column: auto;
  }
  .vdim__resultText {      
    grid-template-columns: 1fr;
    gap: 2rem 1rem;
  }
  .vdim__resultPie {
    width: 100%;
  }
}

/* Styling for each form cell (field) */
.vdim__formCell {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.vdim__formCellFull {
  width: 100%;
}

.vdim__formControl {
  margin-top: 10px;
}

/* Label styling */
.vdim__formCell label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Input and select fields */
.vdim__formControl input,
.vdim__formControl select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
/*  border-radius: 8px;*/
  font-size: 12.5px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vdim__formControl input:focus,
.vdim__formControl select:focus {
 
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* Percentage sign styling */
.vdim__formControl .vdim__suffix {
  font-size: 16px;
 
}

/* Select box options */
.vdim__formControl select {
  font-family: 'Arial', sans-serif;
  padding: 12px;
}

/* Hidden elements initially (for conditional fields like differential rate) */
.vdim__formCell.hidden {
  display: none;
}

/* Button/submit styling */
.vdim__form button {
  padding: 12px 20px;
 
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}



/* Responsive design - make the form responsive for mobile devices */
@media (max-width: 768px) {
  .vdim__form {
    padding: 0px;
    width: 95%;
    margin: 0 auto;
  }

  .vdim__formCell {
    margin-bottom: 15px;
  }

  .vdim__formControl input,
  .vdim__formControl select {
    font-size: 14px;
    padding: 10px;
  }

  .vdim__formCell label {
    font-size: 14px;
  }

  .vdim__formControl .vdim__suffix {
    font-size: 14px;
  }
  .vdim.vdimp-container {
	padding: 0;
}
.vdim__result {
	width: 100%;
}
.vdimp-form .vdim__formGrid{
width:100%;
}
}

@media (min-width: 320px) and (max-width: 520px){
    .vdim__formControl{
        gap:0px !important;
    }
    .vdim__formControl input,
.vdim__formControl select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
/*  border-radius: 8px;*/
  font-size: 12.5px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
}