/* Calculator CSS */

.calc_main {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin: auto auto;
    flex-wrap: wrap;
}

.calc-base1 {
    position: relative;
    display: -ms-flexbox;
    display: inline-block;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: 3%;
    min-width: 260px;
    max-width: 280px;
    border: 0;
}

.calc_bg_transp {
    background-color: transparent;
}

.calc-cost {
    text-align: center;
    margin: 10px 0 0 0;
    padding: 0 0 2px 0;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 8px;
}

.calc-cost span {
    font-size: 4.0em;
    color: #0df;
}

.calc-cost span.rub {
    font-size: 1.5em;
}

.calc-label {
    font-size: 1.25em;
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    background-color: #444;
}

.calc-label p {
    margin: 0;
    color: #fff;
}

.calc-btn {
    background-color: #555;
    font-size: 1.25em;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    width: 100%;
    border: 0;
    color: #0df;
    height: 2.5em;
}

.calc-btn:hover {
    background-color: #666;
    font-size: 1.25em;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    width: 100%;
    border: 0;
    height: 2.5em;
}

.col {
    -ms-flex-preferred-size: 0;
    flex-basis: 0;
    -ms-flex-positive: 1;
    flex-grow: 1;
    max-width: 100%;
}

.col-md-3 {
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 65%;
    padding: 0.35em;
}

.d-flex {
    display: -ms-flexbox !important;
    display: flex !important;
}

.mb-3, .my-3 { margin-bottom: 1rem !important; }
.mt-2, .my-2 { margin-top: 0.5rem !important; }
.mt-3, .my-3 { margin-top: 1rem !important; }

@media (prefers-reduced-motion: reduce) {
    .form-control { transition: none; }
}

.form-control {
    font-size: 1.7em;
    border: 0;
    border-radius: 8px;
    height: 1.8em;
    padding: 0 8px;
    width: 93%;
    background-color: rgba(0,0,0,0.3);
    color: #0df;
}

.form-control::-ms-expand {
    background-color: transparent;
    border: 0;
}

.form-control:focus {
    color: #495057;
    background-color: rgba(0,0,0,0.5);
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-control::-webkit-input-placeholder { color: #6c757d; opacity: 1; }
.form-control::-moz-placeholder { color: #6c757d; opacity: 1; }
.form-control:-ms-input-placeholder { color: #6c757d; opacity: 1; }
.form-control::-ms-input-placeholder { color: #6c757d; opacity: 1; }
.form-control::placeholder { color: #6c757d; opacity: 1; }

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

select.form-control:focus::-ms-value {
    color: #495057;
    background-color: #fff;
}

.form-control-file,
.form-control-range {
    display: block;
    width: 100%;
}

/* ========== Custom Controls ========== */

.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding: 1.2rem;
    border: 1px solid #444;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    -khtml-border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
}

.custom-control-input {
    position: absolute;
    z-index: 1;
    opacity: 0;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: #3176C0;
    background-color: #3176C0;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
    border-color: #80bdff;
}

.custom-control-input:not(:disabled):active ~ .custom-control-label::before {
    color: #fff;
    background-color: #b3d7ff;
    border-color: #b3d7ff;
}

.custom-control-input:disabled ~ .custom-control-label {
    color: #6c757d;
}

.custom-control-input:disabled ~ .custom-control-label::before {
    background-color: #e9ecef;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}

.custom-control-label::before {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: #adb5bd solid 1px;
}

.custom-control-label::after {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    content: "";
    background: no-repeat 50%/50% 50%;
}

.custom-control-label p {
    padding: 0 0 0 1.9em;
    margin: 0 0 3px 0;
    font-size: 1.5em;
    border: 0;
    width: 120%;
}

.custom-control-label p.pl { color: #00bfff; }
.custom-control-label p.pm { color: #696969; }
.custom-control-label p.ph { color: #b22222; }

/* Checkbox */
.custom-checkbox .custom-control-label::before {
    border-radius: 0.25rem;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
    border-color: #0df;
    background-color: #0df;
}

.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e");
}

.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before {
    background-color: #0df;
}

.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before {
    background-color: #0df;
}

/* Radio */
.custom-radio .custom-control-label::before {
    border-radius: 50%;
}

.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before {
    background-color: #0df;
}

/* Badge */
.badge {
    background-color: #444;
    width: auto;
    max-width: 32%;
    padding: 3px 0 3px 6px;
    margin: 10px 0 10px 0;
    color: #0df;
    display: block;
    text-align: left;
    border-radius: 5px;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.badge2 {
    background-color: #444;
    width: auto;
    max-width: 38%;
    padding: 3px 0 3px 6px;
    margin: 10px 0 10px 0;
    color: #0df;
    display: block;
    text-align: left;
    border-radius: 5px;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.badge3 {
    background-color: #444;
    width: auto;
    max-width: 50%;
    padding: 3px 0 3px 6px;
    margin: 10px 0 10px 0;
    color: #0df;
    display: block;
    text-align: left;
    border-radius: 5px;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    .badge { transition: left; }
}

/* ========== MOBILE — 1080px ========== */
@media screen and (max-width: 240px) {
    /* Калькуляторы в столбик, стили как в оригинале */
    .col-md-3 {
        padding: 3.5em;
    }

    .calc-base1 {
        margin: 100px !important;
    }
    .calc-base1:last-child {
        margin-bottom: 0;
    }

    .custom-control {
        padding: 3.0rem;
        border-radius: 1px;
        -webkit-border-radius: 40px;
        -moz-border-radius: 40px;
        -khtml-border-radius: 40px;
    }

    .custom-control-label::before {
        position: absolute;
        top: -2px;
        left: -2px;
        width: 3.25rem;
        height: 3.25rem;
    }

    .custom-control-label::after {
        width: 3.4rem;
        height: 3.4rem;
    }

    .custom-control-label p {
        padding: 0 0 0 2.0em;
        margin: 0 0 0 0;
        font-size: 3.5em;
        width: 120%;
    }

    .custom-radio .custom-control-input:checked ~ .custom-control-label::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%23fff'/%3e%3c/svg%3e");
        margin: -2px 0 0 -2px;
    }

    .badge, .badge2 {
        font-size: 2.3em;
        border-radius: 10px;
        margin: 15px 0 15px -5px;
        padding: 8px 0 8px 11px;
    }

    .calc-btn {
        background-color: #555;
        font-size: 4.25em;
        text-align: center;
        padding: 8px;
        border-radius: 20px;
        width: 100%;
        border: 0;
        color: #0df;
        height: 2.8em;
    }

    .calc-btn:hover {
        background-color: #666;
        font-size: 4.25em;
        text-align: center;
        padding: 8px;
        border-radius: 20px;
        width: 100%;
        border: 0;
        height: 2.8em;
    }

    .form-control {
        font-size: 8.5em;
        border: 0;
        height: 1.4em;
        padding: 0 0 0 18px;
        width: 98%;
        border-radius: 20px;
    }
}
