/*
 * Дополнения темы UnixMine к стилям MineSide (ms/css - без изменений): свой логотип, окна покупки на <dialog>,
 * поля формы заказа, выбор режима, документы и реквизиты в подвале, cookie. Палитра - оранжевая (стили MineSide перекрашены из красного).
 */

main { display: block; }
main:focus { outline: none; }

/* Логотип UnixMine вместо логотипа MineSide */
.header .navbar .logo .pic,
.footer > .wrapper .logo > .wrapper .pic { background-image: url(img/logo.svg?v=2); }

.header .navbar .navbar-mobile { color: #ffa726; font-size: 22px; }
.header .navbar > .navbar-wrapper > .block-center > ul > li > a > .fa { margin-right: 4px; }
.header .navbar > .navbar-wrapper > .block-center > ul > li.active > a { color: #e65100; }

.col-green { color: #43a047; }
.col-red { color: #f44336; }

/* ---------- Выбор режима (над разделами) ---------- */

.tabs > .mode-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 40px 0 0; list-style: none; }
.tabs > .mode-links > li > a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 24px;
    border-radius: 24px;
    background: #fff;
    color: #424242;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: rgba(0, 0, 0, .12) 0 1px 6px, rgba(0, 0, 0, .12) 0 1px 4px;
    transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms;
}
.tabs > .mode-links > li > a:hover { color: #ff9800; }
.tabs > .mode-links > li.active > a { background: #ff9800; color: rgba(0, 0, 0, .7); box-shadow: inset 0 -4px 0 #e65100; }
.tabs > .mode-links .icon { width: 24px; height: 24px; background: no-repeat center / contain; }

.sale-note { margin: 20px 0 0; font-weight: 700; color: #e65100; }
.items > .item-id > .price s { opacity: .55; font-weight: 400; margin-right: 4px; }
.items > .item-id:focus-visible { outline: 3px solid #ff9800; outline-offset: 2px; }

/* ---------- Окна MineSide на <dialog> ---------- */

dialog.modal {
    border: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    color: inherit;
    inset: 0;
}
dialog.modal[open] { display: block; }
dialog.modal::backdrop { background: transparent; }
.modal > .wrapper > .modal-content > .modal-header .fa { margin-right: 6px; }

#buy-modal > .wrapper > .modal-content { padding: 32px 40px; }
#buy-modal .modal-body { display: grid; gap: 12px; }
#buy-modal .input-block > input { height: 52px; line-height: 52px; font-size: 18px; }
#buy-modal .modal-footer { grid-template-columns: 1fr 1fr; }
#buy-modal .modal-footer [data-buy-price] { font-style: normal; }
#buy-modal .modal-footer [data-buy-price] s { opacity: .6; font-weight: 400; margin-right: 4px; }

.field__error { display: none; margin-top: 4px; font-size: 13px; color: #c62828; text-align: center; }
.field.is-invalid > input,
.field.is-invalid .promo-row > input { box-shadow: inset 0 0 0 2px #ff9800; }
.field.is-invalid .field__error { display: block; }

.promo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.promo-row > input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    box-sizing: border-box;
    border: 0;
    border-radius: 4px;
    outline: none;
    background: #eee;
    font-size: 18px;
    text-align: center;
}
.promo-row > input:focus { box-shadow: rgba(0, 0, 0, .16) 0 3px 10px, rgba(0, 0, 0, .23) 0 3px 10px; }
.promo-row > .btn { height: 44px; }
.promo__status { display: block; min-height: 0; font-size: 13px; text-align: center; color: #757575; }
.promo__status:empty { display: none; }
.promo__status.is-ok { color: #2e7d32; }
.promo__status.is-error { color: #c62828; }

.buy-hint { margin: 0; padding: 8px 12px; border-radius: 4px; background: #fff3e0; color: #8a5a17; font-size: 13px; line-height: 1.5; text-align: center; }
.buy-hint.is-error { background: #ffebee; color: #c62828; }
.buy-note, .buy-legal { margin: 0; font-size: 12px; line-height: 1.5; color: #9e9e9e; text-align: center; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: #616161; text-align: left; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #ff9800; }
.check a, .buy-legal a { text-decoration: underline; }
.check__error { margin: 0; font-size: 13px; color: #c62828; text-align: center; }

/* Выбор способа оплаты */
.pay-options { display: grid; gap: 10px; }
.pay-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: #eee;
    color: #212121;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms;
}
.pay-option:hover { background: #fff3e0; box-shadow: inset 0 -4px 0 #ff9800; }
.pay-option__logo img { display: block; width: 96px; height: 40px; object-fit: contain; }
.pay-option__text { display: grid; }
.pay-option__title { font-weight: 700; }
.pay-option__desc { font-size: 13px; color: #757575; line-height: 1.4; }
.pay-option > .fa { font-size: 24px; color: #ff9800; }

/* ---------- Подвал: документы, реквизиты, оплата ---------- */

.footer-legal { padding-top: 20px; padding-bottom: 28px; border-top: 1px solid #e0e0e0; font-size: 13px; line-height: 1.6; color: #757575; text-align: center; }
.footer-legal__docs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; font-weight: 700; }
.footer-legal__seller { margin: 10px 0 0; }
.footer-legal__pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; margin-top: 12px; }
.footer-legal__pay .pay-logos { margin: 0; }

/* ---------- Cookie ---------- */

.cookie {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    max-width: 760px;
    margin: auto;
    padding: 16px 20px;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: rgba(0, 0, 0, .16) 0 3px 10px, rgba(0, 0, 0, .23) 0 3px 10px;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1 1 320px; margin: 0; }

@media (max-width: 767px) {
    #buy-modal > .wrapper > .modal-content { padding: 24px 20px; }
    #buy-modal .modal-footer { grid-template-columns: 1fr; }
    .tabs > .mode-links { justify-content: center; }
}

/* Кнопки разделов магазина - компактнее, чтобы помещались в один ряд */
@media (min-width: 768px) {
    .tabs .tab-links { grid-template-columns: repeat(auto-fill, minmax(150px, 190px)); grid-gap: 14px; padding: 24px 0; }
    .tabs .tab-links > li > a { grid-template-columns: 52px calc(100% - 52px); height: 52px; border-bottom-width: 5px; border-radius: 12px; }
    .tabs .tab-links > li > a > .block-left { padding: 10px; }
    .tabs .tab-links > li > a:active > .block-left,
    .tabs .tab-links > li.active > a > .block-left { padding: 12px; }
    .tabs .tab-links > li > a > .block-left > .icon { height: 32px; width: 32px; }
    .tabs .tab-links > li > a > .block-right { line-height: 42px; font-size: 17px; }
}

/* Карточки товаров: одной высоты в ряду, цена внизу, картинка занимает свободное место */
.items > .item-id { display: flex; flex-direction: column; }
.items > .item-id > .image { flex: 1 1 auto; min-height: 114px; height: auto; }
.items > .item-id > .price { margin-top: auto; flex: none; }

/* Кнопки разделов: иконка и текст по центру лицевой части кнопки (без нижней полосы) */
@media (min-width: 768px) {
    .tabs .tab-links > li > a { align-items: stretch; }
    .tabs .tab-links > li > a > .block-left,
    .tabs .tab-links > li > a:active > .block-left,
    .tabs .tab-links > li.active > a > .block-left { display: flex; align-items: center; justify-content: center; padding: 0; height: auto; }
    .tabs .tab-links > li > a > .block-right { display: flex; align-items: center; justify-content: center; line-height: 1.1; }
}
.buy-agree { margin: 0; font-size: 13px; line-height: 1.5; color: #616161; text-align: center; }
.buy-agree a { text-decoration: underline; }

/* Окно покупки: одна кнопка «Оплатить» по центру, закрытие - крестиком */
#buy-modal .modal-content { position: relative; }
#buy-modal .modal-footer { grid-template-columns: 1fr; justify-items: center; }
#buy-modal .modal-footer > div { width: 100%; max-width: 320px; }
.buy-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: #f0f0f0; font-size: 24px; line-height: 1; color: #616161; cursor: pointer; }
.buy-x:hover { color: #212121; background: #e6e6e6; }

/* Значок Discord (SVG) - по центру круглой кнопки, как шрифтовые значки рядом */
.livedrops > .start > .top > ul.links > li > a svg { display: block; margin: 9px auto 0; }
