input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

input[type=number] {
    -moz-appearance: textfield; /* Firefox */
}

/* дата в input[type=date] по умолчанию выровнена по центру. Смещаем ее влево. */
input::-webkit-date-and-time-value {
    text-align:left;
}

/* фикс для macos safari: плейсхолдер для даты вылезал за пределы инпута и раздвигал в высоту ячейку таблицы (напр. кредитные кааникулы) */
input::-webkit-datetime-edit {
    height: 100%;
    padding: 0;
}

/* скрываем picker в полях с датой, т.к. отображаем свою иконку календарика */
[type="date"]::-webkit-inner-spin-button {
    display: none;
}
[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
}

*:focus {
    outline: none !important;
}

a:hover, a:active, a:focus {
    text-decoration: none !important;
}

table {
    font-size: inherit;
}

small {
    font-size: 0.857rem;
}

.smaller {
    font-size: 0.929rem;
}

.dropdown-item.disabled {
    opacity: 0.65 !important;
}

/* calc layout */

.calc-form {
    display:block;
    margin-bottom: 0;
    padding-top: 18px;
    position: relative;
}

.calc-frow {
    padding: 0 14px 20px;
    clear: both;
}

.button-row {
    position: relative;
    padding-top: 18px;
    padding-bottom: 18px;
}

.error-row > div {
    background: #fbfcfc;
    color: #dc3545;
    border:1px solid #dce2e6;
    padding: 10px;
    border-radius: 3px;
}

@media only screen and (max-width: 480px) {
    .button-row {
        padding-top: 15px;
        padding-bottom: 15px !important;
        margin-top: 8px;
    }
}

.calc-fleft {
    width: 25%;
    padding-top: 7px;
    float: left;
}

.calc-fright {
    margin-left: 28%;
}

.calc-frow.result-row .calc-fright {
    padding-top: 7px;
}

.calc-frow.loading-row {
    display: none;
    padding-top:1rem;
}

.button-row .calc-fright {
    display: flex;
    align-items: center;
}

.calc-frow.result-sep {
    display: none;
    padding-bottom: 0;
    margin-bottom: 20px;
    border-top: 1px solid #dde5e7;
    box-shadow: 0 1px 1px #fff;
}

.calc-frow.sep-top {
    border-top: 1px solid #dde5e7;
    padding-top: 10px;
}



@media only screen and (min-width: 0px) and (max-width: 480px) {

    .calc-form {
        padding-top: 12px;
    }

    .calc-frow {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 20px;
    }

    .calc-fleft {
        width: 100%;
        float: none;
        padding-bottom: 8px;
        padding-top: 0;
        font-weight: bold;
    }

    .calc-frow.result-row .calc-fleft {
        font-weight: 400;
    }

    .calc-fright {
        width: 100%;
        float: none;
        margin-left: 0;
    }
}


/* calc elements */

.calc-input {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    position: relative;
}

.calc-result-value {
    display: inline-block;
    font-size: 1.1em;
    font-weight: bold;
}

.calc-result-value.raw {
    font-weight: normal;
    font-size: 1em;
}

.calc-result-big {
    display: inline-block;
    color: #333;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
    background-color: #fbfcfc;
    border: 1px solid #dde5e7;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 1.5rem;
    margin: 0.5rem 1rem 0.5rem 0;
    cursor: pointer;
    position: relative;
}

.calc-result-big > .order {
    font-weight: normal;
    display: none;
    position: absolute;
    left: 3px;
    top: 3px;
    font-size: 10px;
    color: #aaa;
}

.calc-result-big:hover > .order {
    display: block;
}

.calc-input-desc {
    display: inline-block;
    color: #758a9a;
    font-weight: 400;
}

.calc-text-desc {
    color: #758a9a;
}

.calc-input-notice {
    margin-top: 4px;
    font-size: 0.9em;
    color: #999999;
}

.calc-inp, .calc-select {
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    display: inline-block;
    max-width: 100%;
    padding: 0 8px;
    background-color: #fff;
    transition: border 0.3s ease;
    text-align: left;
    color: rgb(54,54,54);
    border: 1px solid var(--input-border-color);
    border-radius: var(--input-border-radius);
}

.calc-inp:focus {
    border-color: var(--input-border-color-focused);
}

.calc-inp.calc-error {
    border: 1px solid #f26c63;
}

textarea.calc-inp {
    line-height: 1.3em;
    padding-top: 8px;
    padding-bottom: 8px;
}

.calc-inp[type="date"] {
    background: #fff url('/images/calendar.png') 95% 50% no-repeat;
}

.calc-inp-sm {
    height: 30px;
    min-width: 30px;
    line-height: 29px;
    font-size: 0.929em;
}

.calc-submit, .calc-history-btn {
    display:inline-block;
    padding:0 20px;
    height:36px;
    line-height: 33px;
    border: none;
    cursor:pointer;
    text-decoration:none;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-size: 0.9em;
    background-color: var(--submit-background);
    border-radius: var(--input-border-radius);
}

.calc-submit:hover {
    background-color: var(--submit-background-hover);
}

.calc-submit:focus {
    box-shadow: 0 0 0 1px var(--input-border-color-focused);
}

.calc-history-btn {
    width: 40px;
    padding: 0;
    text-align: center;
    border-radius: var(--input-border-radius);
}

.calc-history-btn:focus {
    border: 1px solid var(--input-border-color-focused)
}

.calc-history-btn .fa {
    font-size: 16px;
    line-height: 36px;
}

.calc-toggle {
    text-decoration: none;
    margin-right: 15px;
    white-space: nowrap;
    padding: 2px 0;
    cursor: pointer;
    line-height: 2em;
    border-bottom: 1px dashed;
}

.calc-toggle.current {
    border-bottom: 1px solid;
    font-weight: bold;
}

.calc-ul {
    padding: 0;
    padding-left: 10px;
}

.calc-ul li {
    list-style: none;
    padding: 3px 0 3px 23px;
    background: url(../images/li-dash.png) left 7px no-repeat;
}

#reset-form {
    display: none;
}

.calc-form.calculated #reset-form {
    display: inline-block;
}

.calc-placeholder {
    display: block;
    position: absolute;
    top: 9px;
    color: #aaa;
    font-size: 13px;
    left: 10px;
    cursor: default;
}

.calc-inp-append {
    display: block;
    position: absolute;
    top: 9px;
    color: rgb(54,54,54);
    font-size: 13px;
    right: 0;
    padding: 0 10px;
    cursor: default;
}

.calc-toggle-button {
    background-color: #fff;
    border: 1px solid var(--input-border-color);
    height: auto;
    line-height: normal;
    padding: 10px 8px;
    margin-top: -1px;
    margin-left: -1px;
    cursor: pointer;
    border-color: #dde0e1;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc-toggle-button .fa {
    color: var(--submit-background)
}

.calc-toggle-button.current {
    box-shadow: inset 0 0 1px 2px #85ceff;
    /*background-color: var(--toggle-button-active-bg-color);*/
    z-index: 1;
    color: inherit;
    font-weight: bold;
}

@media (max-width: 575px) {
    .calc-toggle-button {
        font-size: 14px;
    }
}

@media print {
    .calc-toggle-button {
        display: none;
    }

    .calc-toggle-button.current {
        display: inline-block;
    }
}

.set-global-currency {
    display: block;
    padding: 0.4rem 0.5rem;
    border-radius: var(--input-border-radius);
    color: #555;
    margin: 0.1rem 0;
}

.set-global-currency.current {
    background-color: var(--input-border-color-focused);
    color: #fff;
}

/* tables */

.calc-form-table {
    font-size: 1em;
}

.calc-form-table td {
    padding: 3px;
    vertical-align: top;
}

.calc-form-table tr:first-child td {
    padding-top: 0;
}

.calc-form-table td:first-child {
    padding-left: 0;
}

.calc-form-table td:last-child {
    padding-right: 0;
}

.calc-form-table th {
    font-size: 0.85em;
    font-weight: 400;
}


.schedule-table-wrapper {
    border-radius: 10px;
}

.calcus-widget .schedule-table-wrapper {
    border-radius: 0;
}

.schedule-table {
    font-size: 0.9375em; /* 15px */
}

.schedule-table td, .schedule-table th {
    border: solid #ecf0f1;
    border-width: 1px;
    padding: 7px;
    background-color: #fbfcfc;
}

.schedule-table th {
    color: #566473;
    font-weight: 400;
    vertical-align: top;
    text-align: left;
    border-bottom-width: 2px;
}

.schedule-table:not(.no-hover) tr:hover {
    background-color: #fbfcfc;
}

.schedule-table tr.year-sep td {
    border-top-width: 2px;
}


/* до 767 основной размер шрифта - 16, поэтому уменьшает здесь */
@media only screen and (max-width: 767px) {
    .schedule-table {
        font-size: 0.8125em; /* 13px */
    }
}


.table-offers {
    margin-bottom: 0; /* хз откуда там появился */
}

.table-offers td {
    vertical-align: middle;
}

.table-offers td:first-child {
    padding-left: 0;
}

.table-offers tr:first-child td {
    padding-top: 0;
}

@media only screen and (max-width: 575px) {
    .table-offers {
        font-size: 0.875em; /* 14px */
    }
}


/* checkboxes and radio */

.calc-form label {
    margin-bottom: 0;
}

.calc-checkbox:not(checked) {
    position: absolute;
    opacity: 0;
}

.calc-checkbox:not(checked) + label {
    position: relative;
    padding: 0 0 0 30px;
    display: inline-block;
    height: 22px;
    line-height: 22px;
}

.calc-checkbox:not(checked) + label:before {
    content: '';
    position: absolute;
    box-sizing: content-box;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: #FFF;
    transition: border 0.3s ease;
    border: 1px solid var(--input-border-color);
}

.calc-checkbox:not(checked):focus + label:before {
    border-color: var(--input-border-color-focused);
}

.calc-checkbox:not(checked) + label:after {
    content: '';
    position: absolute;
    box-sizing: content-box;
    top: 4px;
    left: 4px;
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: all .2s;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23758a9a' 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");
}

.calc-checkbox:checked + label:after {
    opacity: 1;
}

.calc-radio:not(checked) {
    position: absolute;
    opacity: 0;
}

.calc-radio:not(checked) + label {
    position: relative;
    padding: 0 0 0 30px;
    display: inline-block;
    height: 22px;
}

.calc-radio:not(checked) + label:before {
    content: '';
    position: absolute;
    box-sizing: content-box;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--input-border-color);
    background: #FFF;
    border-radius: 50%;
}

.calc-radio:not(checked):focus + label:before {
    border-color: var(--input-border-color-focused);
}

.calc-radio:not(checked) + label:after {
    content: '';
    position: absolute;
    box-sizing: content-box;
    top: 5px;
    left: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #758a9a;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: all .1s;
}

.calc-radio:checked + label:after {
    opacity: 1;
}

.calc-radio:checked:disabled + label:after {
    opacity: 0.5;
}

.radio-sep {
    font-size: 0;
    height: 8px;
}


/* ajax search */

.ajax-search-wrapper {
    position: relative;
}

.ajax-search {
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 2rem;
}

.search-results {
    display: none;
    position: absolute;
    z-index: 900;
    top: 100%;
    right: 0;
    left: 0;
    overflow-y: auto;
    max-height: 332px;
    border: 1px solid #ced4da;
    border-top: none;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(43, 44, 44, 0.15);
    border-radius: 0.25rem;
}

.search-result-item {
    cursor: pointer;
    padding: 10px 10px;
}

.search-result-item:hover {
    background-color: #FBFFD0;
}

.search-result-text {
    padding: 10px 10px;
    color: #6c757d;
}

.search-loading {
    position: absolute;
    display: none;
    width: 16px;
    height: 16px;
    top: 50%;
    margin-top: -8px;
    right: 12px;
    background: url(/images/ajax-loader-16.gif);
    opacity: 0.5;
}

.search-cancel {
    display: none;
    position: absolute;
    right: 0.75rem;
    top: calc(50% - 0.6rem);
    cursor: pointer;
}

.search-cancel:after {
    font-family: FontAwesome;
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
    content: "\f00d";
    color: var(--danger)
}


/* history */

.cals-history-btn {

}

#history-container .dropdown-item:nth-child(2) {
    opacity: 0.95;
}

#history-container .dropdown-item:nth-child(3) {
    opacity: 0.90;
}

#history-container .dropdown-item:nth-child(4) {
    opacity: 0.85;
}

#history-container .dropdown-item:nth-child(5) {
    opacity: 0.80;
}

#history-container .dropdown-item:nth-child(6) {
    opacity: 0.75;
}

#history-container .dropdown-item:nth-child(7) {
    opacity: 0.70;
}

#history-container .dropdown-item:nth-child(8) {
    opacity: 0.65;
}

#history-container .dropdown-item:nth-child(9) {
    opacity: 0.60;
}

#history-container .dropdown-item:nth-child(10) {
    opacity: 0.55;
}


/* choices js */

.choices {
    margin-bottom: 0;
}

.choices[data-type*=select-one] > .choices__list > .choices__list > .choices__item--selectable {
    padding-right: 0;
}

.choices[data-type*=select-one] > .choices__list > .choices__list > .choices__item--selectable::after {
    display: none;
}

.choices[data-type*=select-one] .choices__inner {
    font-size: 1rem;
    padding: 0 !important;
    display: flex;
    align-items: center;
    min-height: 36px;
    border-radius: 0; /* 2.5px */
    border: 1px solid #cbd1d5; /* #ddd */
    background-color: #fff;
}

.choices[data-type*=select-one].is-focused .choices__inner {
    border-color: #246F91;
}

.choices__inner {
    border-radius: 0;
}

.choices__list--single {
    padding: 4px 16px 4px 8px !important;
}

.choices__list--dropdown {
    z-index: 2 !important;
}

.choices__list--dropdown .choices__list, .choices__list[aria-expanded] .choices__list {
    max-height: 200px;
}