/* configurator shortcode */
.stage-form {
	background: #fff;
	box-shadow: 0 0 10px rgb(0 0 0 / 10%);
    border-radius: 5px;
	margin-top: 2em;
	padding: 1em;
    min-height: 33vh;
    position: relative;
}

.stages {
	font-size: 0;
    display: flex;
	justify-content: space-between;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.stages:after {
	content: '';
	display: inline-block;
	font-size: 0;
	text-align: justify;
	width: 100%;
}

.stages > label {
	background: #ffffff;
	border: solid 5px #c0c0c0;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
    align-items: center;
    justify-content: center;
	font-size: 0;
	font-weight: 700;
	height: 50px;
	position: relative;
	text-align: center;
	width: 50px;
	z-index: 1;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
    cursor: default;
}

.stages > label.active,
.stages > label.completed {
    border-color: var(--highlight);
}

.stages > label.completed:not(.active),
.stages > label.completed + label {
    cursor: pointer;
}

label.completed:not(.active):after {
	content: '\2713';
	color: var(--light);
    background: var(--highlight);
    border: 5px solid var(--highlight);
    border-radius: 50%;

	display: flex;
	font-size: 16px;

    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    position: absolute;
}

.stages > label.active,
.stages > label.active ~ label {
	font-size: 1rem;
    color: #333;
}

.stages > label.active ~ label.completed:after {
	display: none;
}

.progress {
    display: grid;
}

.progress .foreground,
.progress .background {
    grid-column: 1;
    grid-row: 1;
    display: inline-block;
	height: 5px;
    transform: translateY(-25px);
}

.progress .foreground {
	background: var(--highlight);
	transition: 0.5s;
	width: 0;
}
.progress .background {
	background: var(--light);	
	width: 100%;
}

.panels > section {
	display: none;
}

.panels > section.active {
	display: block;
}

.panels > section {
	border-top: solid 1px #c0c0c0;
	margin: 1em 0 0;
	padding: 1em 0 0;
}

.panels h4 {
    margin-bottom: 20px;
}

.panels :read-write,
.panels select {
	box-sizing: border-box;
	display: block;
	padding: .75em;
    margin: 10px 0;
    border: 1px solid var(--gray);
}

.panels select {
    background-color: #fff;
}

.panels :read-write:not([size]),
.panels select {
	width: 100%;
}

.panels :read-write[size] {
    display: inline-block;
}

.panels input[size] + label {
    margin-left: 0.5em;
}

.panels label + input[size] {
    margin-left: 0.5em;
}

.input-wrap.hidden,
.input-wrap.loading,
.input-wrap.error {
    display: none;
}

.panel-1 .input-wrap.hidden,
.panel-1 .input-wrap.loading,
.panel-1 .input-wrap.error {
    display: block;
}

.input-wrap.hidden > *,
.input-wrap.loading > *,
.input-wrap.error > * {
    visibility: hidden;
}

.input-wrap.hidden .hide-remove {
    display: none;
}

.input-wrap.loading,
.input-wrap.error {
    position: relative;
}

.input-wrap.loading::before {
    content: "";
    display: inline-block;
    position: absolute;
    --b: 48%; /* border thickness */
    --c: var(--highlight); /* the color */
    height: calc( 100% - 2px);
    top: 1px;
    left: 1px;
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 1px;
    background: radial-gradient(white 0%,white 48%, transparent 0), conic-gradient(#0000,var(--c)) content-box;
    -webkit-mask: radial-gradient(farthest-side,#0000 calc(98% - var(--b)),#000 calc(100% - var(--b)));
    -webkit-mask-composite: destination-in;
    animation: load 1s infinite linear;
}

.input-wrap.error:not(.loading)::before {
    content: attr(data-error);
    display: inline-block;
    color: red;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 
}

.stage-form select:invalid {
    color: var(--gray);
}

.stage-form select:invalid option[value=""]:first-child ~ option {
    color: initial;
}

.stage-form select option[value=""]:first-child {
    color: var(--gray);
}

.stage-form .panel output {
    display: block;
    /* padding: 1em; */
    /* border: solid 1px var(--gray); */
    margin-bottom: 1em;
}

.stage-form .panel output dt {
    font-weight: bold;
}

.stage-form .panel output dd {
    font-weight: normal;
}

.stage-form .panel output dd + dt {
    margin-top: 1em;
}

.stage-form .panel output dl dl {
    margin-bottom: 1.5em;
}

.stage-form .panel output dl dl dt,
.stage-form .panel output dl dl dd {
    margin-left: 1.5ch;
}

.stage-form .panel output dl dt.subsection {
    margin-left: 0;
    color: var(--dark);
}

.stage-form .panel output dl dl dt {
    color: var(--gray);
}

.stage-form output fieldset {
    border: none;
    border-top: solid 1.5px var(--highlight);
    margin-bottom: 0.3em;
}

.stage-form output fieldset legend {
    margin: 0 1ch;
    padding: 0 0.5ch;
}

.stage-form output .subsection fieldset {
    border-color: var(--gray);
}


.stage-form #mcb_cfg_price_wrapper {
    margin-top: 2.8em;
    font-size: 1.5em;
    padding-top: 0.5em;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
}

.sticky {
    position: -webkit-sticky;
    position: sticky;
}

.sticky:not(.is-pinned) {
    border-top: 1px solid #ddd;
}

.sticky.top {
    top: 0;
}

.sticky.bottom {
    bottom: 0;
}

.stage-form input + label {
    cursor: pointer;
}

#mcb_cfg_message {
    border-radius: var(--border-radius);
    padding: 1em;
    margin-top: 1em;
}

#mcb_cfg_message.mcb-msg-success {
    background: var(--highlight);
    color: var(--light);
}
#mcb_cfg_message.mcb-msg-error {
    background: var(--danger);
}

button[class].mcb-info {
    display: inline-block;
    margin: 0;
    padding: 1ch;
    background: var(--highlight) url('../img/info.svg');
    background-size: 80% 80%;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
    border: 0;
    border-radius: 50%;
    width: 2em;
    height: 2em;
}

button.mcb-info + .mcb-info-wrapper {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    max-height: 100%;
    z-index: 1001;
    padding-top: 91px;
}

button[class].mcb-info.active + .mcb-info-wrapper {
    display: block;
    overflow: hidden;
}

button[class].mcb-info.active + .mcb-info-wrapper img {
    height: 100%;
    object-fit: contain;
    width: auto;
    object-position: right;
}

button[class].mcb-info + .mcb-info-wrapper::after {
    display: block;
    position: absolute;
    content: '×';
    color: #fff;
    top: calc( 91px + 0.25em);
    right: 0.25em;
    font-size: 3em;
}

.mcb-info-text {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 0.5ch 1ch;
    background: rgba(255,255,255,0.7);
}

@keyframes load {
    to { transform: rotate(1turn); }
}

@media screen and (max-width: 769px) {
    .stage-form {
        margin-left: 0;
        margin-right: 0;
        padding: 0.5em;
    }

    .stage-form #mcb_cfg_price_wrapper {
        font-size: 1.3em;
        margin-top: 2.6em;    
    }

    .stages > label.active, .stages > label.active ~ label {
        font-size: 0.85rem;
    }

    .stages > label {
        width: 44px;
        height: 44px;
    }

    .panels > section {
        margin-top: 0.5em;
    }

    .progress .foreground,
    .progress .background {
        transform: translateY(-22px);
    }

    button[class].mcb-info + .mcb-info-wrapper {
        max-height: 60vh;
    }

    button[class].mcb-info.active + .mcb-info-wrapper {
        padding-top: 67px;
    }

    button[class].mcb-info + .mcb-info-wrapper::after {
        top: calc(67px + 0.25em);
    }

}

@media screen and (max-width: 500px) {
    .stages > label.active, .stages > label.active ~ label {
        font-size: 0.75rem;
    }
    .stages > label {
        width: 32px;
        height: 32px;
    }
    .progress .foreground,
    .progress .background {
        transform: translateY(-16px);
    }  

    button[class].mcb-info + .mcb-info-wrapper {
        max-height: 50vh;
    }

    button[class].mcb-info.active + .mcb-info-wrapper {
        padding-top: 55px;
    }

    button[class].mcb-info + .mcb-info-wrapper::after {
        top: calc(55px + 0.25em);
    }
    
    .stage-form #mcb_cfg_price_wrapper {
        font-size: 1em;
    }
}

@media screen and (max-width: 375px) {
    .stages > label.active, .stages > label.active ~ label {
        font-size: 0.5rem;
    }
    .stages > label {
        width: 26px;
        height: 26px;
    }
    .progress .foreground,
    .progress .background {
        transform: translateY(-12px);
    }
    
    .stage-form #mcb_cfg_price_wrapper {
        font-size: 1em;
    }
}