/* Тема на Bootstrap 5: метрики и компоненты, которые теме давал Bootstrap 3 (подключается до main.css) */

/* Сетка: контейнер 750/970/1170, жёлоб 30px, clearfix (шапка на float) */
.container, .row { --bs-gutter-x: 30px; }
@media (min-width: 576px) { .container { max-width: none; } }
@media (min-width: 768px) { .container { max-width: 750px; } }
@media (min-width: 992px) { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }
.container::before, .container::after { content: " "; display: table; }
.container::after { clear: both; }
.row > .modal { width: 100%; max-width: none; padding-left: 0; padding-right: 0; margin-top: 0; }
/* до 768 колонки BS3 — блоки: отступы схлопываются */
@media (max-width: 767.98px) {
    .container .row { display: block; }
    .container .row::before, .container .row::after { content: " "; display: table; }
    .container .row::after { clear: both; }
}

/* Типографика: корень 10px как в BS3 — в rem считает плашка контактов */
html { font-size: 10px; }
:root { scroll-behavior: auto; }
body { font-size: 14px; line-height: 1.42857143; }
a { text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { line-height: 1.1; }
h1, .h1 { font-size: 36px; }
h2, .h2 { font-size: 30px; }
h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; }
h5, .h5 { font-size: 14px; }
h6, .h6 { font-size: 12px; }
h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; }
h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; }
h1 small, h2 small, h3 small, .h1 small, .h2 small, .h3 small { font-size: 65%; line-height: 1; }
h4 small, h5 small, h6 small, .h4 small, .h5 small, .h6 small { font-size: 75%; line-height: 1; }
small, .small { font-size: 85%; }
p { margin: 0 0 10px; }
ul, ol { margin-top: 0; margin-bottom: 10px; padding-left: 40px; }
ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; }
.list-unstyled { padding-left: 0; }
label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }
hr { margin: 20px 0; border: 0; border-top: 1px solid #eee; opacity: 1; }

/* Цвета темы: в BS5 эти утилиты с !important */
.text-muted { color: #999 !important; }
.text-light { color: #fff !important; }
.text-dark { color: #454e59 !important; }
.text-danger { color: #de815c !important; }
.border-bottom { border-bottom: 1px solid #eee !important; }

/* Картинки */
.img-fluid { display: block; max-width: 100%; height: auto; }
.carousel-inner > .carousel-item > a > img, .carousel-inner > .carousel-item > img { display: block; max-width: 100%; height: auto; line-height: 1; }

/* Кнопки */
.btn { padding: 6px 12px; font-size: 14px; line-height: 1.42857143; white-space: nowrap; }
.btn-lg { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }
.btn:hover, .btn:focus { text-decoration: none; }
.btn:focus-visible { box-shadow: none; }
.btn-light { color: #333; }
.btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; }
.btn-block { display: block; width: 100%; }

/* Формы */
.form-control { height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; border-radius: 4px; }
.form-control::placeholder { color: #999; opacity: 1; }
textarea.form-control { height: auto; }
.form-control-lg { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }
textarea.form-control-lg { height: auto; }
.form-group { margin-bottom: 15px; }
.form-text { margin-top: 0; font-size: 85%; }
input[type="checkbox"], input[type="radio"] { margin: 4px 0 0; line-height: normal; }
.help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; }
@media (min-width: 768px) {
    .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; }
    .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
}
.form-horizontal .form-group { margin-left: -15px; margin-right: -15px; }
.form-horizontal .form-group::before, .form-horizontal .form-group::after { content: " "; display: table; }
.form-horizontal .form-group::after { clear: both; }
.form-horizontal .form-group[class*="col-"] { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; }
@media (min-width: 768px) { .form-horizontal .form-group[class*="col-"] { float: left; } }

/* Алерты */
.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
.alert h4 { margin-top: 0; color: inherit; }
.alert > p, .alert > ul { margin-bottom: 0; }
.alert > p + p { margin-top: 5px; }
.alert-dismissible { padding-right: 35px; }

/* Модальные окна */
@media (min-width: 768px) { .modal-dialog { max-width: 600px; margin: 30px auto; } }
@media (max-width: 767.98px) { .modal-dialog { max-width: none; margin: 10px; } }
.modal-content { color: inherit; border-radius: 6px; box-shadow: 0 5px 15px rgba(0, 0, 0, .5); }
.modal-header { display: block; padding: 15px; border-radius: 0; }
.modal-title { margin: 0; line-height: 1.42857143; }
.modal-footer { display: block; padding: 15px; text-align: right; border-radius: 0; }
.modal-backdrop.show { opacity: .5; }
.close { float: right; font-size: 21px; font-weight: 700; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; opacity: .2; }
.close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; opacity: .5; }
button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; appearance: none; }
.modal-header .close { margin-top: -2px; }

/* Таблицы */
.table { --bs-table-bg: transparent; margin-bottom: 20px; }
.table > :not(caption) > * > * { padding: 8px; line-height: 1.42857143; color: inherit; border-bottom-width: 0; border-top: 1px solid #ddd; box-shadow: none; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: #f9f9f9; }
.table > tbody > tr.success > * { background-color: #dff0d8; }

/* Кнопки BS3 */
.btn-xs { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; }
.center-block { display: block; margin-left: auto; margin-right: auto; }

/* Поле с иконкой: input-group-addon BS3 */
.input-group { flex-wrap: nowrap; }
.input-group-text { padding: 6px 12px; font-size: 14px; line-height: 1; color: #555; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; }
.input-group > .form-control { height: 34px; }

/* Шапка админской темы: navbar BS3 без flex */
header.navbar { display: block; flex-wrap: nowrap; padding: 0; min-height: 50px; border: 1px solid transparent; }
.navbar-fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; border-width: 0 0 1px; }
header.navbar .nav { display: block; padding-left: 0; margin-bottom: 0; list-style: none; }
header.navbar .nav > li { position: relative; display: block; float: left; }
header.navbar .nav > li > a { position: relative; display: block; padding: 10px 15px; }
