/* Окно заказа. Цвета берёт из переменных страницы: --acc, --acc-d, --acc-soft, --ink, --head. */
.om {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: rgba(30, 40, 60, .45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.om[hidden] { display: none; }
.om-box {
  position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow: auto;
  background: #fffdfb; color: var(--ink, #23304a); border-radius: 22px;
  padding: 28px 24px 24px; box-shadow: 0 30px 80px rgba(20, 30, 60, .3);
  font: 16px/1.4 var(--body, system-ui, sans-serif);
}
.om h2 { font: 600 28px/1.15 var(--head, serif); margin: 0 0 18px; }
.om-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; font-size: 28px; line-height: 1; color: inherit; cursor: pointer; opacity: .55;
}
.om-close:hover { opacity: 1; background: var(--acc-soft); }
.om-drop {
  display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer;
  padding: 26px 16px; border: 2px dashed var(--acc); border-radius: 16px; background: var(--acc-soft);
  transition: transform .15s;
}
.om-drop.over { transform: scale(1.02); }
.om-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.om-drop b { font-size: 18px; color: var(--acc-d); }
.om-drop span { font-size: 14px; opacity: .7; }
.om-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.om-thumbs:empty { display: none; }
.om-thumb { position: relative; border-radius: 10px; overflow: hidden; background: #eee; aspect-ratio: 3 / 4; }
.om-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.om-del {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.om-qty {
  position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .92); border-radius: 8px; font-weight: 600; font-size: 14px;
}
.om-qty button { width: 30px; height: 28px; border: 0; background: none; font-size: 18px; color: var(--acc-d); cursor: pointer; }
.om-label { margin: 18px 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.om-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.om-chip {
  border: 1.5px solid rgba(35, 48, 74, .15); background: #fff; color: inherit; border-radius: 12px;
  padding: 10px 14px; font: inherit; cursor: pointer; display: grid; text-align: left; transition: all .15s;
}
.om-chip small { opacity: .65; font-size: 13px; }
.om-chip.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc-d); box-shadow: 0 0 0 1px var(--acc) inset; }
.om-formats { display: grid; grid-template-columns: repeat(4, 1fr); }
.om-sum {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--acc-soft);
}
.om-sum span { font-size: 14px; opacity: .75; }
.om-sum b { font: 600 26px/1 var(--head, serif); color: var(--acc-d); }
.om-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.om input:not([type=file]), .om textarea {
  width: 100%; box-sizing: border-box; font: inherit; color: inherit; padding: 12px 14px;
  border: 1.5px solid rgba(35, 48, 74, .15); border-radius: 12px; background: #fff; resize: vertical;
}
.om textarea { margin-top: 8px; }
.om input:focus, .om textarea:focus { outline: none; border-color: var(--acc); }
.om-error { margin-top: 12px; color: #c0392b; font-weight: 600; }
.om-submit {
  width: 100%; margin-top: 16px; padding: 16px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--acc); color: #fff; font: 600 18px/1 var(--body, system-ui, sans-serif);
  box-shadow: 0 10px 24px -8px var(--acc);
}
.om-submit:hover { background: var(--acc-d); }
.om-done { text-align: center; padding: 20px 0 4px; }
.om-check {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acc-soft); color: var(--acc-d); font-size: 36px;
}
@media (max-width: 560px) {
  .om { padding: 0; align-items: end; }
  .om-box { max-height: 94vh; border-radius: 22px 22px 0 0; padding: 24px 16px 20px; }
  .om-formats { grid-template-columns: repeat(2, 1fr); }
  .om-fields { grid-template-columns: 1fr; }
}
