/* Order panel = capsules «Reservation» component (chunk B6B0VPXw.js, measured in extract.md «Окно заказа»).
   u = 1/1920 of the viewport (0.75px at 1440). Eases: power1.inOut = cubic-bezier(.45,0,.55,1), power2.inOut = cubic-bezier(.65,0,.35,1). */

/* root: fixed inset-0 flex justify-end, opacity 0 -> 1 (.3s power1.inOut); backdrop bg-black opacity .94 */
.order { position: fixed; inset: 0; z-index: var(--z-panel); display: flex; justify-content: flex-end; opacity: 0; visibility: hidden; }
.order__backdrop { position: absolute; inset: 0; background: var(--black); opacity: .94; }
.order__frame { position: relative; height: 100%; padding: calc(10 * var(--u)); }

/* container: h-full bg-darkBrown @rounded-[60]; width 60u -> 30vw (.6s power1.inOut), set by order.js */
.panel { --pw: max(30vw, 420px); position: relative; height: 100%; width: var(--pw); background: var(--dark);
  border-radius: calc(60 * var(--u)); overflow: hidden; }
/* content keeps its final width while the panel grows, so nothing reflows during the opening */
.panel__inner { position: absolute; top: 0; right: 0; bottom: 0; width: var(--pw); }
.panel__inner form { height: 100%; }
/* @px-[40] @pt-[100]; bottom room for the 100u bar */
.panel__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: calc(100 * var(--u)) calc(40 * var(--u)) calc(150 * var(--u)); }
.panel__scroll::-webkit-scrollbar { display: none; }

/* heading !@text-[40] !@leading-[42] font-medium @tracking-[-0.2] white */
.panel__title { margin: 0; font-size: calc(40 * var(--u)); line-height: calc(42 / 40); font-weight: 500;
  letter-spacing: calc(-0.2 * var(--u)); color: var(--white); outline: none; }
/* @text-[18] font-semibold @leading-[23] @tracking-[-0.2] @mt-[30]: intro lightBrown, questions white */
.panel__text, .panel__q { margin: calc(30 * var(--u)) 0 0; font-size: calc(18 * var(--u)); line-height: calc(23 / 18);
  font-weight: 600; letter-spacing: calc(-0.2 * var(--u)); color: var(--light); }
.panel__q { color: var(--white); }

/* option tiles: flex @gap-[7] @mt-[35]; tile flex-1 aspect-square @min-h-[100] bg-black @rounded-[30] @p-[6] */
.opts { display: flex; gap: calc(7 * var(--u)); margin-top: calc(35 * var(--u)); }
.opt { position: relative; flex: 1; aspect-ratio: 1; min-height: calc(100 * var(--u)); background: var(--black);
  border-radius: calc(30 * var(--u)); padding: calc(6 * var(--u)); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
/* 10px lightBrown dot in the centre; hover or selection scales it x30 (.5s power1.inOut); selected dot turns #F4EFE7 */
.opt__fill { position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 9999px; background: var(--light);
  transition: transform .5s cubic-bezier(.45, 0, .55, 1), background-color .5s cubic-bezier(.45, 0, .55, 1); }
.opt__img { position: relative; height: 70%; border-radius: calc(23 * var(--u)); overflow: hidden; }
.opt__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* owner's book mockups (transparent PNG, 1/2/3 copies): whole object, no crop */
.opt__img img.opt__mock { object-fit: contain; padding: 6%; }
.opt__label { position: relative; height: 30%; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: calc(18 * var(--u)); line-height: calc(23 / 18); font-weight: 400; letter-spacing: calc(-0.2 * var(--u)); color: var(--white);
  transition: color .5s cubic-bezier(.45, 0, .55, 1); }
.opt:has(input:checked) .opt__fill { transform: scale(30); background: var(--white); }
.opt:has(input:checked) .opt__label { color: var(--black); }
@media (hover: hover) and (pointer: fine) {
  .opt:hover .opt__fill { transform: scale(30); }
  .opt:hover .opt__label { color: var(--black); }
}
.opt:has(input:focus-visible) { outline: 2px solid var(--white); outline-offset: 2px; }

/* underlined inputs: bg-darkBrown text-lightBrown placeholder-lightBrown @text-[18] @pb-[20]; 1px lightBrown line,
   a #F4EFE7 line grows 0 -> 100% on focus (.3s power2.inOut). Row @mt-[38]. */
.row { display: flex; gap: calc(30 * var(--u)); margin-top: calc(38 * var(--u)); }
.row + .row { margin-top: calc(30 * var(--u)); }
.row[hidden] { display: none; }
.field { position: relative; flex: 1; min-width: 0; }
.field input { display: block; width: 100%; margin: 0; padding: 0 0 calc(20 * var(--u)); border: 0; border-radius: 0; outline: none;
  background: var(--dark); color: var(--light); font-size: calc(18 * var(--u)); line-height: 1.5; -moz-appearance: textfield; }
.field input::placeholder { color: var(--light); opacity: 1; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__line { display: block; height: 1px; background: var(--light); position: relative; }
.field__line::after { content: ""; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s cubic-bezier(.65, 0, .35, 1); }
.field:focus-within .field__line::after { transform: scaleX(1); }
.field[data-invalid] .field__line, .field[data-invalid] .field__line::after { background: #FFACAC; }
.err { display: block; margin-top: calc(10 * var(--u)); font-size: calc(18 * var(--u)); line-height: calc(23 / 18); font-weight: 600; color: #FFACAC; }
.err:empty { display: none; }

/* step 2: review list */
.review { margin: calc(35 * var(--u)) 0 0; display: grid; gap: calc(18 * var(--u)); }
.review div { display: grid; gap: calc(4 * var(--u)); }
.review dt, .review dd { margin: 0; font-size: calc(18 * var(--u)); line-height: calc(23 / 18); }
.review dt { color: var(--light); }
.review dd { color: var(--white); overflow-wrap: anywhere; }
.panel__back { margin-top: calc(30 * var(--u)); padding: 0 0 calc(4 * var(--u)); border: 0; border-bottom: 1px solid var(--light); background: none;
  color: var(--light); font-size: calc(18 * var(--u)); font-weight: 600; cursor: pointer; }
.panel__back:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.step[hidden] { display: none; }

/* bottom bar: absolute @bottom-[10] @h-[100] @rounded-[50] bg-black @pl-[40] @pr-[20], inset 10u; width 100u -> 100% (.6s) */
.bar { position: absolute; left: calc(10 * var(--u)); bottom: calc(10 * var(--u)); width: calc(100 * var(--u)); height: calc(100 * var(--u));
  border-radius: calc(50 * var(--u)); background: var(--black); overflow: hidden; opacity: 0; }
.bar__content { width: calc(var(--pw) - 20 * var(--u)); height: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 0 calc(20 * var(--u)) 0 calc(40 * var(--u)); opacity: 0; }
.bar__data { display: flex; margin: 0; }
.bar__data dt, .bar__data dd { margin: 0; font-size: calc(18 * var(--u)); line-height: calc(23 / 18); font-weight: 400;
  letter-spacing: calc(-0.2 * var(--u)); white-space: nowrap; }
.bar__data dt { color: var(--light); }
.bar__data dd { color: var(--white); }
/* divider h-full w-[1px] bg-lightBrown @mx-[30] opacity .2 */
.bar__div { width: 1px; background: var(--light); opacity: .2; margin: 0 calc(30 * var(--u)); }

.bar.is-confirm .bar__data > div:first-child, .bar.is-confirm .bar__div { display: none; }

/* close: @w-[52] @h-[52] bg-black rounded-full, @top-[30] @left-[50] of the frame (= 20u / 40u inside the panel);
   Plus icon @w-[20] rotate 45, fill #F4EFE7; hover: white disc scale 0 -> 1 and icon -> #181717 (.3s power2.inOut) */
.panel__close { position: absolute; z-index: 2; top: calc(20 * var(--u)); left: calc(40 * var(--u)); width: calc(52 * var(--u)); height: calc(52 * var(--u));
  border: 0; padding: 0; border-radius: 9999px; background: var(--black); display: grid; place-items: center; cursor: pointer; overflow: hidden; opacity: 0; }
.panel__close-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--white); transform: scale(0);
  transition: transform .3s cubic-bezier(.65, 0, .35, 1); }
.panel__close svg { position: relative; width: calc(20 * var(--u)); rotate: 45deg; }
.panel__close rect { fill: var(--white); transition: fill .3s cubic-bezier(.65, 0, .35, 1); }
@media (hover: hover) and (pointer: fine) {
  .panel__close:hover .panel__close-fill { transform: scale(1); }
  .panel__close:hover rect { fill: var(--black); }
}
.panel__close:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* phones: capsules' own mobile drawer is a scaled miniature; full-height sheet with the same anatomy */
@media (max-width: 767px) {
  .order__frame { padding: 6px; }
  .panel { --pw: calc(100vw - 12px); border-radius: 24px; }
  .panel__scroll { padding: 76px 20px 120px; }
  .panel__close { top: 14px; left: 20px; width: 44px; height: 44px; }
  .panel__close svg { width: 17px; }
  .field input { font-size: 16px; }
  .opt { border-radius: 20px; }
  .bar { left: 8px; bottom: 8px; height: 76px; border-radius: 38px; }
  .bar__content { width: calc(var(--pw) - 16px); padding: 0 10px 0 22px; }
  .bar__div { margin: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .opt__fill, .opt__label, .field__line::after, .panel__close-fill, .panel__close rect { transition: none; }
}

/* deploy 03.12: sending failed — same voice as the field errors; spam trap kept off-screen for people */
.panel__err { margin-top: calc(24 * var(--u)); font-size: calc(18 * var(--u)); line-height: calc(23 / 18); font-weight: 600; color: #FFACAC; }
.panel__err a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
