:root {
--vdim-color-primary: #ffcd30;
--vdim-color-accent-1: #ff8f00;
}
.vdim {
padding: 2rem;
container-type: inline-size;
background: white;
border-radius: 0.3rem;
box-shadow: 0 0 3rem rgba(0,0,0,0.1);
}
.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;
}
.vdim__typeSelector{
margin-bottom: 2rem;
}
.vdim__typeSelector select{
font-weight: bold;
}
.vdim__formGrid label {
opacity: 0.7;
font-size: 0.9rem;
}
.vdim__formCell { 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;
background-color: white;
}
.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;
}
.vdim__button:hover {
background: black;
}
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;
} .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;
} .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);
} .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%;
}
}