/* Calculate and ship кабинета (/parcel/send-parcel, T-050) на лейауте Main2Layout2610. Корень .db.db--cab.cs.calculate2610.
   Подключается страницей App/Parcel2610/CalculatePage через <Head> после styles.css → lr-tokens.css → cabinet-menu2610.css → lr-base.css.
   Источник — блок .cs пакета calculate2610 (html/calculate2610.css). Сброс .db, .db-card, .db-btn, .db-ico, .db-logo, keyframes db-*
   и встраивание в .cab2610 берутся из lr-base. Не перенесено: каркас пакета (.db-nav*, .db-dock*, .db-sheet*, .db-shell, .db-side, .bw,
   лента, .cs .db-ribbon), переменные .db{}, гостевой режим .cs.is-guest (у нас блоки вошедшего не рендерятся).
   Переломы: 1199 и 980 — @media по экрану под .cab2610; 700 и 560 — @container db (правило X−32: 668, 528); форма — @container cs-form. */

/* Пока /html/calculate2610.css не загрузился, страница прячет блок (\3c style>.calculate2610 { visibility: hidden }) */
.db.db--cab.calculate2610 { visibility: visible; }

.cs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; align-items: stretch; gap: 16px; margin-top: 24px; }

/* T-VT-311: строка под H1 и строка гостю «войдите» под формой (макет T-VT-308, вариант A) */
.cs .cs-lead { max-width: 72ch; margin-top: 8px; color: var(--slate); font-size: 17px; font-weight: 500; line-height: 1.45; }
.cs .cs-lead + .cs-layout { margin-top: 20px; }
.cs .cs-guest { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 16px; padding: 16px 20px; border-radius: 20px; background: var(--soft-bg); color: var(--slate); font-size: 15px; font-weight: 600; line-height: 1.45; }
.cs-guest a { margin-left: auto; color: var(--lr-color-brand-accent-text-strong, #7d5000); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cs-guest a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ===== Форма ===== */
.cs-form { container: cs-form / inline-size; gap: 12px; padding: 22px; }
.cs-route { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: start; gap: 12px; }
.cs-size { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); align-items: start; gap: 8px; }
.cs-weight, .cs-dims { min-width: 0; }
.cs-dims__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-place { position: relative; min-width: 0; }

/* Поле: мягкий фон без рамки, подпись всплывает, фокус кольцом акцента */
.cs-field { position: relative; display: block; height: 58px; border-radius: 15px; background: var(--soft-bg); cursor: text; transition: background-color .2s, box-shadow .2s; }
.cs-field:hover { background: #f1f1f3; }
.cs-field:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.cs-field input { display: block; width: 100%; height: 100%; min-width: 0; padding: 22px 16px 6px; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; text-overflow: ellipsis; -webkit-appearance: none; appearance: none; }
.cs-field__lab { position: absolute; left: 16px; right: 40px; top: 50%; translate: 0 -50%; overflow: hidden; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; transition: top .18s var(--ease), translate .18s var(--ease), font-size .18s var(--ease); }
.cs-field input:focus + .cs-field__lab, .cs-field input:not(:placeholder-shown) + .cs-field__lab { top: 9px; translate: 0 0; font-size: 12px; font-weight: 700; }
.cs-field--place input { padding-right: 52px; }
.cs-field--num input { padding-right: 36px; }
/* Единица — кнопка переключения (как PdUnitInput), в пакете была только подписью */
.cs-field__unit { position: absolute; right: 14px; top: 50%; translate: 0 -50%; color: var(--lr-color-brand-accent-text, #9a6200); font-size: 13px; font-weight: 800; cursor: pointer; border-radius: 6px; transition: color .2s; }
.cs-field__unit:hover { color: var(--ink); }
.cs-field__unit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-field__unit.is-new { animation: cs-unit .4s var(--ease); }
@keyframes cs-unit { 0% { opacity: 0; translate: 0 -20%; } 100% { opacity: 1; translate: 0 -50%; } }

/* Кнопка адресной книги в поле адреса */
.cs-bookbtn { position: absolute; right: 8px; top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 11px; background: none; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.cs-bookbtn:hover, .cs-bookbtn[aria-expanded="true"] { background: #fff; color: var(--lr-color-brand-accent-text-strong, #7d5000); box-shadow: 0 1px 2px rgba(26, 31, 51, .08); }

/* Ошибка: поле розовое, текст под ним */
.cs-field.is-bad, .cs-place.is-bad .cs-field { background: #fff1f1; box-shadow: inset 0 0 0 1.5px #f3b4b7; }
.cs-field.is-bad:focus-within, .cs-place.is-bad .cs-field:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--red); }
.motion .cs-shake { animation: cs-shake .36s; }
@keyframes cs-shake { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }
.cs .cs-err { margin: 6px 4px 0; color: #c8333a; font-size: 13px; font-weight: 700; line-height: 1.35; }
.motion .cs-err { animation: cs-err .25s var(--ease); }
@keyframes cs-err { from { opacity: 0; translate: 0 -4px; } }

/* Подсказки адресов (список autocomplete.js и локальный список: геолокация, адресная книга) */
.cs .cs-drop { position: absolute; z-index: 30; left: 0; right: 0; top: 64px; max-height: 320px; overflow: auto; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(26, 31, 51, .08), 0 18px 40px rgba(26, 31, 51, .16); }
.cs-drop li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 11px; font-size: 15px; font-weight: 700; cursor: pointer; }
.cs-drop li small { overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.cs-drop li:hover, .cs-drop li[aria-selected="true"] { background: #fff6e6; }
/* T-VT-274 (M2): активная подсказка с клавиатуры — полоса 3px (4.7:1 к фону строки), фона мало (1.1:1) */
.cs-drop li[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--lr-color-brand-accent-text, #9a6200); font-weight: 700; }
.cs-drop li.is-empty { color: var(--slate); font-weight: 600; cursor: default; background: none; }
.cs-drop li.cs-drop__head { padding: 6px 12px 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; cursor: default; background: none; }
.cs-drop li.cs-drop__geo { flex-direction: row; align-items: center; gap: 10px; color: var(--lr-color-brand-accent-text, #9a6200); }
.cs-drop__geo svg { flex: none; width: 18px; height: 18px; }
.motion .cs-drop:not([hidden]) { animation: cs-drop .2s var(--ease); }
@keyframes cs-drop { from { opacity: 0; translate: 0 -6px; } }

/* Обмен From и To */
.cs-swap { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--soft-bg); color: var(--slate); cursor: pointer; transition: background-color .2s, color .2s, rotate .45s var(--ease); }
.cs-swap svg { width: 20px; height: 20px; }
.cs-swap:hover { background: #fff6e6; color: var(--lr-color-brand-accent-text-strong, #7d5000); }
.cs-swap.is-spin { rotate: 180deg; }

/* Низ формы: единицы и Search */
.cs-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.cs-units { display: flex; gap: 8px; }
.cs-seg { position: relative; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--soft-bg); }
.cs-seg button { position: relative; z-index: 1; width: 44px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 14px; font-weight: 800; cursor: pointer; transition: color .2s; }
.cs-seg button[aria-checked="true"] { color: var(--ink); }
.cs-seg__pill { position: absolute; left: 3px; top: 3px; width: 44px; height: 36px; border-radius: 9px; background: #fff; box-shadow: 0 1px 2px rgba(26, 31, 51, .1), 0 4px 10px rgba(26, 31, 51, .06); transition: translate .3s var(--ease); pointer-events: none; }
.cs-seg.is-b .cs-seg__pill { translate: 44px 0; }
.cs-go { min-width: 200px; height: 52px; }
.cs-go.is-ready { animation: cs-ready 1.6s ease-out; }
@keyframes cs-ready { 0% { box-shadow: 0 0 0 0 rgba(234, 163, 10, .55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(234, 163, 10, 0); } }

/* Узкая форма: адреса столбиком, обмен между ними, вес на всю ширину, размеры в ряд, Search во всю ширину */
@container cs-form (max-width: 520px) {
  .cs-route, .cs-size { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cs-swap { justify-self: center; width: 40px; height: 40px; margin: -2px 0; rotate: 90deg; }
  .cs-swap.is-spin { rotate: 270deg; }
  .cs-foot { flex-direction: column; align-items: stretch; }
  .cs-go { width: 100%; min-width: 0; }
}
@container cs-form (max-width: 380px) {
  .cs-dims__row { gap: 6px; }
  .cs-dims .cs-field input { padding-left: 12px; padding-right: 28px; }
  .cs-dims .cs-field__lab { left: 12px; right: 26px; }
  .cs-dims .cs-field__unit { right: 10px; }
}

/* Перелёт значений из Recent routes в поля (чип живёт в body, классы db cs дают переменные) */
.cs-fly { position: fixed; z-index: 90; left: 0; top: 0; padding: 6px 11px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 1px 2px rgba(26, 31, 51, .1), 0 12px 26px rgba(60, 30, 0, .18); pointer-events: none; }
.cs-field.is-flash { animation: cs-flash .7s var(--ease); }
@keyframes cs-flash { 0% { background: #ffe2a8; } 100% { background: var(--soft-bg); } }

/* ===== Коробка по размерам ===== */
.cs-box { align-items: center; justify-content: center; gap: 10px; padding: 14px 14px 16px; text-align: center; }
.cs-box__stage { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px 10px 10px; border-radius: 18px; background: var(--warm); }
.cs svg.cs-box3d { display: block; width: 140px; height: 98px; overflow: visible; fill: none; stroke: none; }
.cs-box3d path { stroke: #c98a12; stroke-width: 1.6; stroke-linejoin: round; transition: d .55s var(--ease), fill .35s, stroke .35s, opacity .35s; }
.cs-box3d__t { fill: #ffe7b8; }
.cs-box3d__l { fill: #f7c86a; }
.cs-box3d__r { fill: #eeb24a; }
.cs-box3d path.cs-box3d__tape { fill: none; stroke: #fff8e8; stroke-width: 3; opacity: .85; }
.cs-box3d__shadow { fill: rgba(176, 112, 10, .14); transition: rx .55s var(--ease); }
.cs-box.is-empty .cs-box3d path { fill: rgba(255, 255, 255, .55); stroke: #d7a24a; stroke-dasharray: 4 4; }
.cs-box.is-empty .cs-box3d__tape { opacity: 0; }
.cs-box__cap { min-height: 20px; color: var(--slate); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.motion .cs-box.play svg.cs-box3d { animation: cs-drop-in .7s var(--ease) both; }
@keyframes cs-drop-in { 0% { opacity: 0; translate: 0 -18px; } 70% { translate: 0 2px; } 100% { opacity: 1; translate: 0 0; } }
.cs-box.is-bump svg.cs-box3d { animation: cs-bump .45s var(--ease); }
@keyframes cs-bump { 40% { scale: 1.05; } }

.cs-carriers { display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-carriers li { position: relative; display: flex; align-items: center; justify-content: center; width: 60px; height: 38px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); filter: grayscale(1); opacity: .5; transition: filter .35s, opacity .35s, box-shadow .35s; transition-delay: calc(var(--i) * 140ms); }
.cs-carriers__ok { position: absolute; top: -6px; right: -6px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 0 0 2px #fff; scale: 0; transition: scale .3s var(--ease); transition-delay: calc(var(--i) * 140ms + 120ms); }
.cs-carriers__ok svg { width: 11px; height: 11px; stroke-width: 3; }
.cs-box.is-ready .cs-carriers li { filter: none; opacity: 1; box-shadow: inset 0 0 0 1px rgba(234, 163, 10, .35), 0 6px 14px rgba(60, 30, 0, .08); }
.cs-box.is-ready .cs-carriers__ok { scale: 1; }
.cs-box__txt { color: var(--slate); font-size: 13px; font-weight: 700; line-height: 1.4; }

/* ===== Recent routes и Templates ===== */
.cs-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.cs-start--single { grid-template-columns: minmax(0, 1fr); }
.cs-list { gap: 8px; padding: 18px 14px 12px; }
.cs-list__head { display: flex; align-items: center; gap: 12px; padding: 0 6px 4px; }
.cs-list h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.cs .cs-all { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--lr-color-brand-accent-text, #9a6200); font-size: 14px; font-weight: 800; white-space: nowrap; }
.cs-all svg { width: 16px; height: 16px; transition: translate .25s var(--ease); }
.cs-all:hover svg { translate: 3px 0; }
.cs-list ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.cs-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%; padding: 10px 8px; border: 0; border-radius: 14px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background-color .2s; }
.cs-row:hover { background: #fff6e6; }
.cs-row:disabled { cursor: progress; opacity: .7; }
.cs-row__logo { display: flex; align-items: center; justify-content: center; width: 52px; height: 40px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.cs-row__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-row__txt b { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 800; white-space: nowrap; }
.cs-row__txt b span { overflow: hidden; text-overflow: ellipsis; }
.cs-row__txt b svg { flex: none; width: 15px; height: 15px; color: var(--lr-color-brand-accent-text, #9a6200); }
.cs-row__txt > span { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cs-row__dot { width: 3px; height: 3px; border-radius: 50%; background: #c3c6cf; }
.cs-row__go { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft-bg); color: var(--lr-color-brand-accent-text, #9a6200); transition: background .2s, color .2s, rotate .4s var(--ease); }
.cs-row:hover .cs-row__go { background: var(--grad); color: #fff; rotate: -90deg; }
.cs-row__ship { grid-column: 2 / -1; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--lr-color-brand-accent-text, #9a6200); font-size: 13px; font-weight: 800; }
.cs-row__ship svg { width: 15px; height: 15px; transition: translate .25s var(--ease); }
.cs-row:hover .cs-row__ship svg { translate: 3px 0; }
.motion .cs-list li { opacity: 0; }
.motion .cs-list.play li { animation: db-in .5s var(--ease) both; animation-delay: calc(120ms + var(--i, 0) * 80ms); }
.cs-row.is-used { animation: cs-used .8s var(--ease); }
@keyframes cs-used { 0% { background: #ffe2a8; } 100% { background: none; } }

/* Заказ площадки над формой (T-VT-335, макет 315/05 A) */
.cs .cs-order { margin-bottom: 16px; padding: 12px 18px; border-radius: 20px; background: var(--warm); color: var(--slate); font-size: 14px; }
.cs-order p { margin: 0; }
.cs-order .cs-order__h { margin-bottom: 2px; color: var(--ink); font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }

/* Строка Mass shipping */
.cs .cs-bulk { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; border-radius: 20px; background: var(--warm); font-size: 15px; font-weight: 600; color: var(--slate); transition: box-shadow .2s, transform .2s; }
.cs-bulk b { color: var(--ink); font-weight: 800; }
.cs-bulk > svg { margin-left: auto; color: var(--lr-color-brand-accent-text, #9a6200); transition: translate .25s var(--ease); }
.cs-bulk:hover { box-shadow: 0 10px 24px rgba(60, 30, 0, .1); }
.cs-bulk:hover > svg { translate: 3px 0; }

@media (max-width: 1199px) {
  .cab2610 .calculate2610 h1 { font-size: 36px; }
  .cab2610 .cs-layout { grid-template-columns: minmax(0, 1fr) 232px; }
  .cab2610 .cs svg.cs-box3d { width: 120px; height: 84px; }
  .cab2610 .cs-carriers li { width: 52px; height: 36px; }
  .cab2610 .cs-carriers .db-logo--usps { height: 20px; }
  .cab2610 .cs-carriers .db-logo--ups { height: 24px; }
  .cab2610 .cs-carriers .db-logo--fedex { height: 12px; }
}
@media (max-width: 980px) {
  .cab2610 .calculate2610 h1 { font-size: 30px; }
  .cab2610 .cs-layout { grid-template-columns: minmax(0, 1fr); margin-top: 18px; gap: 12px; }
  .cab2610 .cs-box { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: "stage carriers" "stage txt"; align-content: center; gap: 10px 16px; text-align: left; }
  .cab2610 .cs-box__stage { flex: none; grid-area: stage; padding: 10px 8px 8px; gap: 4px; }
  .cab2610 .cs svg.cs-box3d { width: 116px; height: 81px; }
  .cab2610 .cs-box__cap { font-size: 12.5px; }
  .cab2610 .cs-carriers { grid-area: carriers; justify-content: flex-start; align-self: end; }
  .cab2610 .cs-box__txt { grid-area: txt; align-self: start; }
  .cab2610 .cs-start { margin-top: 12px; gap: 12px; }
  .cab2610 .cs-bulk { margin-top: 12px; }
}
/* Контейнерные переломы — с тем же префиксом .cab2610, что и @media выше: специфичность равна, правила ниже побеждают */
@container db (max-width: 668px) {
  .cab2610 .cs-start { grid-template-columns: minmax(0, 1fr); }
}
@container db (max-width: 528px) {
  .cab2610 .calculate2610 h1 { font-size: 28px; }
  .cab2610 .cs-form { padding: 16px; }
  .cab2610 .cs-box { grid-template-columns: 124px minmax(0, 1fr); padding: 14px; gap: 8px 12px; }
  .cab2610 .cs svg.cs-box3d { width: 100px; height: 70px; }
  .cab2610 .cs-carriers { gap: 6px; }
  .cab2610 .cs-carriers li { width: 46px; height: 34px; border-radius: 10px; }
  .cab2610 .cs-carriers .db-logo--usps { height: 18px; }
  .cab2610 .cs-carriers .db-logo--ups { height: 22px; }
  .cab2610 .cs-carriers .db-logo--fedex { height: 11px; }
  .cab2610 .cs-box__txt { font-size: 13px; }
  .cab2610 .cs-list { padding: 16px 8px 8px; }
  .cab2610 .cs-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 6px; }
  .cab2610 .cs-row__logo { width: 48px; height: 38px; }
  .cab2610 .cs-bulk { padding: 12px 14px; font-size: 14px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .calculate2610 *, .calculate2610 ::before, .calculate2610 ::after, .cs-fly { animation: none !important; transition: none !important; }
}

/* ===== T-VT-024 (аудит мобильного UX, п. 7): то же правило, что у калькулятора /parcel/send в T-VT-023 (WeightAndDimensions):
   на узкой форме вес и три размера — сеткой 2×2, подписи «Length/Длина» и значения не режутся ===== */
@container cs-form (max-width: 380px) {
  .calculate2610 .cs-size { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .calculate2610 .cs-dims, .calculate2610 .cs-dims__row { display: contents; }
  .calculate2610 .cs-size .cs-err { grid-column: 1 / -1; }
  /* в сетке 2×2 у полей снова полная ширина — отступы как у веса (правило 380 выше сжимало их для ряда из трёх) */
  .calculate2610 .cs-dims .cs-field input { padding-left: 16px; padding-right: 36px; }
  .calculate2610 .cs-dims .cs-field__lab { left: 16px; right: 40px; }
  .calculate2610 .cs-dims .cs-field__unit { right: 14px; }
}
/* Недавние маршруты: города переносятся, а не режутся многоточием («Philadelphia» на 320) */
@container db (max-width: 400px) {
  .cab2610 .calculate2610 .cs-row__txt b { flex-wrap: wrap; white-space: normal; }
  .cab2610 .calculate2610 .cs-row__txt b span { overflow: visible; overflow-wrap: anywhere; }
}

/* «Return label» (T-VT-348): галочка под маршрутом - From и To меняются местами */
.cs-ret { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--slate, #50586a); cursor: pointer; }
.cs-ret input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #1a1a1a; cursor: pointer; }
.cs-ret b { color: var(--ink, #1a1a1a); font-weight: 800; }
