/* Онлайн-заказ фотопечати. Секция на foto.html, стиль сайта (tokens.css). */

[data-po] [hidden] { display: none !important; }

.po__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr); gap: clamp(20px, 3vw, 40px); align-items: start; }

.po__drop {
  display: grid; place-items: center; gap: 8px; text-align: center;
  min-height: 208px; padding: 28px 20px; cursor: pointer;
  background: #fff; border: 1.5px dashed #c9c9cf; border-radius: 20px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.po__drop:hover { border-color: var(--c-accent); }
.po__drop.is-over { border-color: var(--c-accent); background: rgba(0,113,227,.06); transform: translateY(-1px); }
.po__drop-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--c-tile); font-size: 20px; }
.po__drop b { font-size: 19px; letter-spacing: -.02em; }
.po__drop span { color: var(--c-muted); font-size: 14px; line-height: 1.45; max-width: 42ch; }
.po__drop .btn-solid { margin-top: 6px; }
.po__hint { margin: 10px 0 0; font-size: 13px; color: var(--c-muted); min-height: 18px; }
.po__hint.is-flash { color: var(--c-accent); }

.po__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
.po__count { font-size: 13px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.po__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.po__tools .sel { height: 36px; width: auto; min-width: 132px; font-size: 13px; border-radius: 10px; padding: 0 10px; }

.po__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.po__item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; padding: 9px 10px;
}
.po__thumb { width: 64px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--c-tile); display: grid; place-items: center; }
.po__thumb img { width: 100%; height: 100%; object-fit: cover; }
.po__ext { font-size: 10px; font-weight: 600; color: var(--c-muted); letter-spacing: .04em; }
.po__name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.po__name b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po__name em { font-size: 12px; font-style: normal; color: var(--c-muted); }
.po__q { color: var(--c-muted); }
.po__q--bad { color: #b25000; }

.po__ctrls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.po__sel { height: 34px; border-radius: 9px; border: 1px solid var(--c-divider); background: #fff; color: var(--c-text); font: inherit; font-size: 13px; padding: 0 8px; max-width: 168px; }
.po__copies { display: inline-flex; align-items: center; border: 1px solid var(--c-divider); border-radius: 9px; overflow: hidden; height: 34px; }
.po__copies button { width: 26px; height: 100%; border: 0; background: #fff; color: var(--c-text); font-size: 15px; cursor: pointer; }
.po__copies button:hover { background: var(--c-tile); }
.po__copies input { width: 40px; height: 100%; border: 0; border-left: 1px solid var(--c-divider); border-right: 1px solid var(--c-divider); text-align: center; font: inherit; font-size: 13px; -moz-appearance: textfield; }
.po__copies input::-webkit-outer-spin-button, .po__copies input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.po__toggles { display: inline-flex; gap: 4px; }
.po__tg { height: 30px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--c-divider); background: #fff; color: var(--c-muted); font: inherit; font-size: 12px; cursor: pointer; }
.po__tg.is-on { background: rgba(0,113,227,.09); border-color: rgba(0,113,227,.45); color: var(--c-accent); font-weight: 500; }
.po__del { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--c-tile); color: var(--c-muted); font-size: 12px; cursor: pointer; }
.po__del:hover { background: #ffe6e3; color: #c4271c; }

.po__aside { position: sticky; top: 120px; background: var(--c-tile); border-radius: 20px; padding: 22px 20px 18px; display: grid; gap: 10px; }
.po__sum { margin: 0; display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-size: clamp(32px, 4vw, 44px); font-weight: 600; letter-spacing: -.035em; }
.po__sum small { font-size: .42em; font-weight: 500; color: var(--c-muted); letter-spacing: 0; }
.po__rows { margin: 4px 0 0; display: grid; }
.po__rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.07); font-size: 14px; }
.po__rows dt { margin: 0; color: var(--c-muted); }
.po__rows dd { margin: 0; font-variant-numeric: tabular-nums; }
.po__rows .po__big { font-weight: 600; color: var(--c-text); font-size: 15px; }
.po__rows .po__big dt { color: var(--c-text); }
.po__cta { width: 100%; margin-top: 4px; }
.po__note { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--c-muted); }

/* форма */
.po__form { margin-top: 26px; background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px; padding: clamp(18px, 2.4vw, 28px); }
.po__form h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.025em; }
.po__form p.po__sub { margin: 0 0 16px; color: var(--c-muted); font-size: 14px; }
.po__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.po__fields .po__full { grid-column: 1 / -1; }
.po__fields label.po__lbl { display: block; font-size: 12px; color: var(--c-muted); margin: 0 0 5px; }
.po__fields .inp { height: 44px; }
.po__radio { display: flex; gap: 8px; flex-wrap: wrap; }
.po__radio label { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--c-divider); border-radius: 10px; font-size: 13.5px; cursor: pointer; background: #fff; }
.po__radio label:has(input:checked) { border-color: var(--c-accent); background: rgba(0,113,227,.06); }
.po__radio input { accent-color: var(--c-accent); }
.po__consent { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--c-muted); line-height: 1.45; margin: 14px 0; grid-column: 1 / -1; }
.po__consent input { margin-top: 2px; accent-color: var(--c-accent); }
.po__consent button { border: 0; background: none; padding: 0; color: var(--c-link); font: inherit; text-decoration: underline; cursor: pointer; }
.po__submit { grid-column: 1 / -1; justify-self: start; }
.po__err { grid-column: 1 / -1; color: #c4271c; font-size: 13px; min-height: 18px; margin: 0; }

.po__progress { margin: 22px 0 0; }
.po__track { height: 6px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; }
.po__fill { height: 100%; width: 2%; background: var(--c-accent); border-radius: 99px; transition: width .2s linear; }
.po__ptext { margin: 8px 0 0; font-size: 13px; color: var(--c-muted); font-variant-numeric: tabular-nums; }

.po__done { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px; padding: clamp(22px, 3vw, 36px); margin-top: 22px; }
.po__done-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(48,209,88,.14); color: #1a8f3c; font-size: 22px; margin-bottom: 12px; }
.po__done h3 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.03em; }
.po__done p { margin: 0 0 8px; color: var(--c-muted); font-size: 15px; max-width: 60ch; }
.po__done-id { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.po__done-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.po__off { display: none; }
.po--off .po__drop, .po--off .po__aside, .po--off .po__form, .po--off .po__tools { display: none; }

@media (max-width: 980px) {
  .po__grid { grid-template-columns: 1fr; }
  .po__aside { position: static; order: 2; }
}
@media (max-width: 720px) {
  .po__item { grid-template-columns: 52px minmax(0, 1fr); }
  .po__thumb { width: 52px; height: 44px; }
  .po__ctrls { grid-column: 1 / -1; justify-content: flex-start; }
  .po__fields { grid-template-columns: 1fr; }
  .po__sel { max-width: none; flex: 1 1 140px; }
  .po__drop { min-height: 176px; padding: 22px 14px; }
  .po__submit { width: 100%; justify-self: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .po__drop, .po__fill { transition: none; }
}
