/* Аукционный зал и «Мои залы». Цвета — от токенов sauda-ds, запасные значения те же. */
.ar-root {
    --ar-accent: var(--sd-primary, #006196);
    --ar-accent-h: #004D78;
    --ar-accent-soft: var(--sd-primary-50, #E5F1F8);
    --ar-ink: var(--sd-ink, #2A2C31);
    --ar-muted: var(--sd-ink-3, #5F707F);
    --ar-line: var(--sd-hair, #E7EEF4);
    --ar-zebra: #F4F9FC;
    --ar-ok: #10A85A; --ar-ok-t: #0B7A42; --ar-ok-bg: #E7F8EF;
    --ar-bad: #D64545; --ar-bad-bg: #FDECEC;
    --ar-warn: #A86A0B; --ar-warn-bg: #FDF3E1;
    --ar-shadow: 0 1px 2px rgba(0, 40, 70, .08);
    color: var(--ar-ink);
    font-variant-numeric: tabular-nums;
}
.ar-root a { color: var(--ar-accent); }
.ar-card { background: #fff; border: 1px solid var(--ar-line); border-radius: 10px; box-shadow: var(--ar-shadow); }
.ar-pad { padding: 20px; }
.ar-k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ar-muted); }
.ar-sub { font-size: 12px; color: var(--ar-muted); }

/* шапка лота */
.ar-lot { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; padding: 20px; }
.ar-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--ar-zebra); }
.ar-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.ar-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; background: var(--ar-zebra); }
.ar-thumbs img.is-on { border-color: var(--ar-accent); }
.ar-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ar-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--ar-zebra); border: 1px solid var(--ar-line); white-space: nowrap; }
.ar-chip.is-num { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-title { font-size: 20px; line-height: 1.3; font-weight: 700; margin: 10px 0 4px; }
.ar-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--ar-line); border: 1px solid var(--ar-line); border-radius: 8px; margin-top: 14px; overflow: hidden; }
.ar-facts > div { padding: 10px 14px; background: #fff; }
.ar-facts .ar-v { font-size: 14px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.ar-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.ar-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ar-line); background: #fff; color: var(--ar-ink) !important; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.ar-btn:hover { background: var(--ar-accent-soft); }
.ar-clock { margin-left: auto; font-size: 12px; color: var(--ar-muted); text-align: right; }
.ar-clock b { color: var(--ar-ink); font-weight: 600; }
.ar-clock-bar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; padding: 10px 16px; }
.ar-hours { font-size: 12px; color: var(--ar-muted); margin-top: 10px; }

/* зал */
.ar-hall { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.ar-side { position: sticky; top: 16px; }
.ar-plate { border-radius: 6px; padding: 10px 12px; font-size: 13px; font-weight: 600; background: var(--ar-zebra); color: var(--ar-muted); }
.ar-plate small { display: block; font-size: 12px; font-weight: 500; opacity: .9; margin-top: 1px; }
.ar-plate.is-ok { background: var(--ar-ok-bg); color: var(--ar-ok-t); }
.ar-plate.is-bad { background: var(--ar-bad-bg); color: var(--ar-bad); }
.ar-plate.is-warn { background: var(--ar-warn-bg); color: var(--ar-warn); }
.ar-price-block { margin-top: 18px; }
.ar-price { font-size: 30px; font-weight: 700; line-height: 1.15; margin-top: 2px; letter-spacing: -.01em; }
.ar-price small { font-size: 13px; font-weight: 600; color: var(--ar-muted); margin-left: 6px; letter-spacing: 0; }
.ar-timer { margin-top: 18px; }
.ar-timer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ar-timer-next { font-size: 13px; font-weight: 600; color: var(--ar-muted); text-align: right; }
.ar-timer-t { font-size: 40px; font-weight: 700; line-height: 1; margin-top: 6px; }
.ar-bar { height: 6px; border-radius: 3px; background: var(--ar-line); margin-top: 10px; overflow: hidden; }
.ar-bar i { display: block; height: 100%; background: var(--ar-accent); border-radius: 3px; }
.ar-timer.is-hot .ar-timer-t { color: var(--ar-bad); }
.ar-timer.is-hot .ar-bar i { background: var(--ar-bad); }
.ar-cta { display: block; width: 100%; min-height: 52px; margin-top: 18px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--ar-accent); color: #fff; font-size: 16px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.ar-cta:hover { background: var(--ar-accent-h); }
.ar-cta:disabled, .ar-cta.is-wait { background: var(--ar-line); color: var(--ar-muted); cursor: default; }
.ar-cta.is-buy { background: var(--ar-ok); color: #fff; }
.ar-cta.is-buy:hover { background: #0E9550; }
.ar-cta:focus-visible { outline: 3px solid rgba(0, 97, 150, .35); outline-offset: 2px; }
.ar-hint { font-size: 12px; color: var(--ar-muted); text-align: center; margin-top: 8px; }
.ar-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--ar-muted); }
.ar-toggle { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ar-line); font-size: 12px; font-weight: 500; color: var(--ar-muted); cursor: pointer; user-select: none; }
.ar-toggle input { accent-color: var(--ar-accent); margin: 0; }
.ar-offer { margin-top: 14px; }
.ar-offer .form-control { height: 44px; font-size: 16px; font-weight: 600; }
.ar-offer-error { font-size: 12px; color: var(--ar-bad); margin-top: 4px; }

/* таблицы истории и лестницы */
.ar-cardh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--ar-line); }
.ar-cardh b { font-size: 16px; font-weight: 700; }
.ar-cardh button { border: 0; background: none; padding: 0; color: var(--ar-accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.ar-table { width: 100%; border-collapse: collapse; }
.ar-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ar-muted); text-align: left; padding: 9px 20px; border-bottom: 1px solid var(--ar-line); white-space: nowrap; }
.ar-table td { padding: 10px 20px; border-bottom: 1px solid var(--ar-line); }
.ar-table td.is-r { white-space: nowrap; }
.ar-history { overflow-x: auto; }
.ar-history td { white-space: nowrap; }
.ar-table tr:last-child td { border-bottom: 0; }
.ar-table tbody tr:nth-child(even) td { background: var(--ar-zebra); }
.ar-table .is-r { text-align: right; }
.ar-table .is-n { width: 72px; color: var(--ar-muted); }
.ar-table .is-lead td { background: var(--ar-ok-bg) !important; }
.ar-table .is-now td { background: var(--ar-accent-soft) !important; font-weight: 700; }
.ar-ladder tbody tr.is-pick { cursor: pointer; }
.ar-ladder tbody tr.is-pick:hover td { background: var(--ar-accent-soft) !important; }
.ar-me { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--ar-accent); background: var(--ar-accent-soft); }
.ar-sig { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--ar-warn); background: var(--ar-warn-bg); }
.ar-empty { padding: 32px 20px; text-align: center; color: var(--ar-muted); }
.ar-empty b { display: block; color: var(--ar-ink); font-size: 14px; margin-bottom: 2px; }

/* телефон: кнопка и есть таймер, прилипает к низу */
.ar-dock { display: none; }
.ar-dock-space { display: none; }
.ar-tbtn { position: relative; overflow: hidden; display: block; width: 100%; height: 60px; padding: 0; border: 0; border-radius: 12px; background: var(--ar-accent); color: #fff; cursor: pointer; }
.ar-tbtn-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, .2); }
.ar-tbtn-in { position: relative; display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 16px; text-align: left; }
.ar-tbtn-in small { display: block; font-size: 11px; font-weight: 600; opacity: .85; }
.ar-tbtn-in b { font-size: 17px; font-weight: 700; }
.ar-tbtn-t { font-size: 22px; font-weight: 700; }
.ar-tbtn.is-hot { background: var(--ar-bad); }
.ar-tbtn.is-wait, .ar-tbtn:disabled { background: #CBD5E1; color: #334155; cursor: default; }
.ar-tbtn.is-buy { background: var(--ar-ok); }

/* «Мои залы» */
.ar-rooms-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 170px 120px 120px; gap: 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--ar-line); color: inherit !important; text-decoration: none !important; }
.ar-rooms-row:last-child { border-bottom: 0; }
.ar-rooms-row:hover { background: var(--ar-accent-soft); }
.ar-rooms-row .ar-photo { aspect-ratio: 4 / 3; border-radius: 6px; }
.ar-rooms-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.ar-rooms-price { text-align: right; font-size: 14px; font-weight: 700; }
.ar-rooms-timer { text-align: right; }
.ar-rooms-timer b { display: block; font-size: 16px; font-weight: 700; }
.ar-rooms-timer b.is-hot { color: var(--ar-bad); }
.ar-rooms-tag { text-align: right; }
.ar-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--ar-zebra); color: var(--ar-muted); }
.ar-tag.is-ok { background: var(--ar-ok-bg); color: var(--ar-ok-t); }
.ar-tag.is-bad { background: var(--ar-bad-bg); color: var(--ar-bad); }
.ar-tag.is-in { background: var(--ar-accent-soft); color: var(--ar-accent); }
.ar-rooms-cells { display: contents; }

/* плашки «нет связи» / ответ сервера */
.ar-notice { margin-bottom: 8px; padding: 8px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; line-height: 1.4; }
.ar-notice--offline { background: #FFF6E5; color: #6B4600; }
.ar-notice--error { background: #FDEDED; color: #8E1D1D; }

/* Раскладка зала — по ширине его колонки, а не окна: в обучении и на страницах с боковым меню
   колонка заметно уже экрана. Телефонная часть (кнопка у низа экрана) осталась на @media. */
.ar-wide { container-type: inline-size; }
@container (max-width: 1000px) {
    .ar-hall { grid-template-columns: 340px minmax(0, 1fr); }
    .ar-lot { grid-template-columns: 260px minmax(0, 1fr); }
}
@container (max-width: 780px) {
    .ar-hall { grid-template-columns: 1fr; }
    .ar-side { position: static; }
}
@container (max-width: 600px) {
    .ar-lot { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
    .ar-rooms-row { grid-template-columns: 72px minmax(0, 1fr) 140px 100px; }
    .ar-rooms-price { display: none; }
}
@media (max-width: 767px) {
    /* на телефоне от шапки нужно только узнать лот — остальное отодвигало цену и таймер за экран */
    .ar-lot { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
    .ar-lot .ar-photo { aspect-ratio: 16 / 9; }
    .ar-thumbs, .ar-facts, .ar-hours, .ar-lot-seller, .ar-links .ar-btn { display: none; }
    .ar-links { margin-top: 6px; }
    .ar-pad { padding: 14px; }
    .ar-title { font-size: 16px; margin-top: 8px; }
    .ar-clock { margin-left: 0; text-align: left; }
    .ar-hall { margin-top: 12px; gap: 12px; }
    .ar-table th, .ar-table td { padding: 8px 12px; }
    .ar-cardh { padding: 12px; }
    .ar-side .ar-cta-main { display: none; }
    .ar-dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--ar-line); }
    .ar-dock-space { display: block; height: 84px; }
    .ar-rooms-row { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 104px); gap: 10px; padding: 10px 12px; }
    .ar-rooms-cells { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
    .ar-rooms-name, .ar-rooms-row .ar-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    .ar-rooms-row .ar-sub { -webkit-line-clamp: 1; }
    .ar-rooms-timer b { font-size: 14px; }
}
