/* spot_rent.css — аренда авто — обёртка виджета localrent (rent.tpl). Полировка 10.2026: старая страница в стиле редизайна.
   Токены — spot_ui.css, классы с префиксом spot-. Крошки и заголовок повторяют образец page.tpl / spot_pages.css
   (тот файл на этом маршруте не подключается). Виджет живёт в shadow DOM элемента <mrc-widget>, снаружи управляем
   только его контейнером; старые правила .widget-content / .header-text относились к прежней версии виджета
   и до shadow DOM не доставали, поэтому не перенесены. Мобильный вид первичен, без зависимостей от наведения. */

body.spot-rent-body {
    background: var(--spot-bg);
}

.spot-rent {
    font-family: var(--spot-font);
    color: var(--spot-ink);
    padding-bottom: 32px;
}

.spot-rent > * {
    min-width: 0;
}

/* навигационная цепочка: одна строка, длинное название текущей страницы обрезается многоточием */
.spot-rent-crumbs ol {
    margin: 0;
    padding: 8px 0 0;
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 4px;
    font-size: 14px;
    line-height: 18px;
}

.spot-rent-crumbs li {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-shrink: 0;
}

.spot-rent-crumbs li:last-child {
    flex: 1 1 auto;
    min-width: 0;
}

.spot-rent-crumbs li + li::before {
    content: "›";
    color: var(--spot-mut);
}

.spot-rent-crumbs a {
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--spot-ink-2);
    text-decoration: none;
}

.spot-rent-crumbs [aria-current] {
    min-width: 0;
    min-height: 44px;
    display: block;
    line-height: 44px;
    font-weight: 600;
    color: var(--spot-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spot-rent-h1 {
    margin: 0;
    padding: 4px 0 8px;
    font-family: var(--spot-font);
    font-size: 26px;
    font-weight: 800;
    line-height: 32px;
    letter-spacing: -0.4px;
    color: var(--spot-ink);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.spot-rent-lead {
    margin: 0 0 16px;
    max-width: 640px;
    font-size: 15px;
    line-height: 22px;
    color: var(--spot-ink-2);
    text-wrap: pretty;
}

/* сетка: телефон — виджет, под ним шаги; десктоп — шаги справа */
.spot-rent-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* карточка с виджетом: на телефоне во всю ширину экрана, как текст страниц page.tpl */
.spot-rent-card {
    min-width: 0;
    margin: 0 -15px;
    padding: 16px 16px 20px;
    background: var(--spot-surface);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spot-rent-widget {
    position: relative;
    min-width: 0;
    min-height: 96px;
}

/* виджет (shadow DOM): снаружи только ширина и блочность хоста */
.spot-rent-widget mrc-widget {
    display: block;
    width: 100%;
    min-width: 0;
}

/* «форма загружается» — пока виджет не вставил <mrc-widget> (js/spot_rent.js) */
.spot-rent-wait {
    min-height: 96px;
    padding: 20px 16px;
    box-sizing: border-box;
    border: 1px dashed var(--spot-line);
    border-radius: var(--spot-radius);
    background: var(--spot-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    color: var(--spot-mut);
}

.spot-rent-wait-ic {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: var(--spot-surface);
    color: var(--spot-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spot-rent-pulse 1.6s ease-in-out infinite;
}

.spot-rent-wait-off {
    display: none;
    color: var(--spot-ink-2);
    font-weight: 600;
}

.spot-rent-widget--on .spot-rent-wait {
    display: none;
}

.spot-rent-widget--off .spot-rent-wait-on,
.spot-rent-widget--off .spot-rent-wait-ic {
    display: none;
}

.spot-rent-widget--off .spot-rent-wait-off {
    display: block;
}

.spot-rent-widget--off .spot-rent-wait {
    border-style: solid;
    background: var(--spot-amber-soft);
    border-color: transparent;
}

@keyframes spot-rent-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

/* запасная кнопка на localrent.com — видна всегда */
.spot-rent-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spot-rent-btn {
    width: 100%;
    min-width: 0;
    height: var(--spot-control-h-l);
    box-sizing: border-box;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: var(--spot-red);
    color: #FFFFFF;
    font-family: var(--spot-font);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.spot-rent-btn:focus,
.spot-rent-crumbs a:focus {
    color: #FFFFFF;
    text-decoration: none;
}

.spot-rent-crumbs a:focus {
    color: var(--spot-ink-2);
}

.spot-rent-btn:active {
    background: var(--spot-red-dark);
}

.spot-rent-ext {
    flex-shrink: 0;
    color: rgba(255, 255, 255, .85);
}

.spot-rent-note {
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    color: var(--spot-mut);
    text-align: center;
}

/* «Как это работает» */
.spot-rent-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spot-rent-h2 {
    margin: 0;
    padding: 8px 0 0;
    font-family: var(--spot-font);
    font-size: 17px;
    font-weight: 800;
    line-height: 22px;
    color: var(--spot-ink);
}

.spot-rent-steps {
    margin: 0;
    padding: 0 16px;
    list-style: none;
    border-radius: var(--spot-radius-l);
    background: var(--spot-surface);
    border: 1px solid var(--spot-line);
}

.spot-rent-step {
    min-height: 60px;
    padding: 10px 0;
    box-sizing: border-box;
    border-bottom: 1px solid var(--spot-line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.spot-rent-step:last-child {
    border-bottom: 0;
}

.spot-rent-step-ic {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--spot-red-soft);
    color: var(--spot-red-dark-fg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spot-rent-step-txt {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 500;
    color: var(--spot-ink);
    overflow-wrap: anywhere;
}

.spot-rent-step-n {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    color: var(--spot-mut);
    font-variant-numeric: tabular-nums;
}

/* SEO-текст из админки (uni_seo.text), если заполнен */
.spot-rent-text {
    margin: 12px -15px 0;
    padding: 20px 16px;
    background: var(--spot-surface);
    font-size: 15px;
    line-height: 23px;
    color: var(--spot-ink-2);
    overflow-wrap: break-word;
}

.spot-rent-text *:not(svg):not(path) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background-color: transparent !important;
}

.spot-rent-text p,
.spot-rent-text ul,
.spot-rent-text ol {
    margin: 0 0 14px;
}

.spot-rent-text > :last-child {
    margin-bottom: 0;
}

/* заголовки SEO-текста: селектор с .spot-rent, чтобы специфичность (0,2,1) перебивала сброс *:not(svg):not(path) (0,1,2) выше */
.spot-rent .spot-rent-text h1,
.spot-rent .spot-rent-text h2,
.spot-rent .spot-rent-text h3,
.spot-rent .spot-rent-text h4 {
    margin: 22px 0 10px;
    font-size: 18px !important;
    line-height: 24px !important;
    font-weight: 800;
    color: var(--spot-ink);
}

.spot-rent-text > :first-child {
    margin-top: 0;
}

.spot-rent-text a {
    color: var(--spot-focus);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.spot-rent-text img,
.spot-rent-text iframe {
    max-width: 100%;
    height: auto;
}

/* фокус с клавиатуры */
.spot-rent-crumbs a:focus-visible,
.spot-rent-btn:focus-visible {
    outline: 2px solid var(--spot-focus);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .spot-rent-crumbs a:hover {
        color: var(--spot-red-fg);
        text-decoration: none;
    }
    .spot-rent-btn:hover {
        color: #FFFFFF;
        background: var(--spot-red-dark);
        text-decoration: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spot-rent-wait-ic {
        animation: none;
    }
}

/* десктоп */
@media (min-width: 992px) {
    .spot-rent-h1 {
        padding: 8px 0 10px;
        font-size: 32px;
        line-height: 40px;
    }
    .spot-rent-lead {
        margin-bottom: 24px;
        font-size: 16px;
        line-height: 24px;
    }
    .spot-rent-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
        gap: 24px;
    }
    .spot-rent-card {
        margin: 0;
        padding: 28px 32px 32px;
        border: 1px solid var(--spot-line);
        border-radius: var(--spot-radius-l);
        gap: 24px;
    }
    .spot-rent-widget {
        min-height: 120px;
    }
    .spot-rent-wait {
        min-height: 120px;
    }
    .spot-rent-cta {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    .spot-rent-btn {
        width: auto;
        min-width: 260px;
        padding: 0 24px;
    }
    .spot-rent-note {
        text-align: right;
    }
    .spot-rent-side {
        position: sticky;
        top: 16px;
    }
    .spot-rent-h2 {
        padding-top: 0;
    }
    .spot-rent-text {
        margin: 24px 0 0;
        padding: 28px 32px;
        border: 1px solid var(--spot-line);
        border-radius: var(--spot-radius-l);
    }
}
