/* Поправки к старому main.css (минифицирован, не правим): элементы новой вёрстки,
   которых на старом сайте не было. Подключается после main.css в base.html и уходит
   вместе со старыми стилями при новом дизайне. */

/* Браузер задаёт <dialog> и кнопкам свой чёрный цвет текста — берём цвет страницы (#333).
   Кнопки Bootstrap (.btn-*) задают цвет классом, их это не трогает. */
dialog,
button {
    color: inherit;
}

/* Таблицы Bootstrap (.table) — почти чёрный #212529, остальной текст — #333. */
.table {
    color: inherit;
}

/* Баннер cookie (ТЗ §14): templates/includes/cookie_banner.html. */
.cookieBanner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 48px 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.cookieBanner__text {
    flex: 1;
    margin: 0;
    font-size: 14px;
}

.cookieBanner[hidden],
.cookieBanner:not([data-cookie-preferences-open]) [data-cookie-preferences],
.cookieBanner[data-cookie-preferences-open] [data-cookie-notice] {
    display: none;
}

.cookieBanner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookieBanner__close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cookieSettings {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 640px) {
    .cookieBanner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media print {
    .cookieBanner {
        display: none;
    }
}

/* Окно изменения заказа в панели: apps/orders/templates/orders/staff/list.html и detail.html. */
.staffDialog {
    width: 100%;
    max-width: 500px;
    padding: 0;
    border: 0;
    background: transparent;
}

.staffDialog:focus {
    outline: 0;
}

/* При открытии окна фокус попадает на крестик, и браузер обводит его; фокус и так видно по прозрачности (Bootstrap .close:focus). */
.staffDialog .close:focus {
    outline: 0;
}

.staffDialog::backdrop {
    background: rgba(0, 0, 0, .5);
}

.staffDialog .modal-content {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

/* У превью новые шаблоны пишут width/height (место под фото резервируется до загрузки),
   а main.css ограничивает только max-width/max-height — без auto фото растягивается.
   На старом сайте атрибутов не было, размер шёл от самой картинки. */
.productGallery__lg img,
.poductItem__img img,
.reviewsList__image img {
    width: auto;
    height: auto;
}
