/* KynWorks order pop-up (assets/js/order.js), /buy and /logiciel. Light KynWorks theme, red #e50000.
   Desktop: centred dialog, choice on the left, contact on the right. Phone (< 700 px): bottom sheet, one column. */
.kord { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; color: var(--ink, #111); }
.kord[hidden] { display: none; }
html.kord-lock, html.kord-lock body { overflow: hidden; }
.kord__back { position: absolute; inset: 0; background: rgba(17, 17, 17, .55); opacity: 0; transition: opacity .22s; }
.kord__dlg { position: relative; width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .45); padding: 28px clamp(18px, 3vw, 34px) 26px; opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .22s, transform .3s var(--ease, cubic-bezier(.22, 1, .36, 1)); outline: none; }
.kord.is-open .kord__back { opacity: 1; }
.kord.is-open .kord__dlg { opacity: 1; transform: none; }
.kord__x { position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 12px; border: 0; background: #f4f1ec; color: var(--ink, #111); cursor: pointer; display: grid; place-items: center; }
.kord__x:hover { background: var(--ink, #111); color: #fff; }
.kord__eye { margin: 0 0 4px; color: #e50000; font-size: 13px; font-weight: 600; }
.kord__h { margin: 0 0 6px; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; padding-inline-end: 44px; outline: none; }
.kord__app { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink, #111); background: #f4f1ec; border-radius: 10px; padding: 6px 10px; display: inline-block; }
.kord__app[hidden] { display: none; }
.kord__lead { margin: 0 0 18px; color: var(--muted, #6e6862); font-size: 14.5px; line-height: 1.55; max-width: 640px; }
.kord__cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; }
.kord__col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.kord__col + .kord__col { border-inline-start: 1px solid var(--line, rgba(17, 17, 17, .1)); padding-inline-start: 26px; }
.kord__fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.kord__fs legend, .kord__lbl { display: block; padding: 0; margin: 0 0 7px; font-size: 13.5px; font-weight: 600; color: var(--ink, #111); }
.kord__lbl--h { font-size: 15px; margin: 0; }

.kord__offers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kord__opt { position: relative; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line, rgba(17, 17, 17, .12)); cursor: pointer; transition: box-shadow .2s, background .2s; }
.kord__opt input, .kord__seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kord__opt:hover { box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, .35); }
.kord__opt.is-on { box-shadow: inset 0 0 0 2px #e50000; background: #fff6f6; }
.kord__opt:focus-within, .kord__seg:focus-within { outline: 2px solid #e50000; outline-offset: 2px; }
.kord__optn { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.kord__optp { font-size: 13px; color: var(--muted, #6e6862); }
.kord__opt.is-on .kord__optp { color: #e50000; font-weight: 600; }

.kord__durs { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 0; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line, rgba(17, 17, 17, .12)); padding: 3px; }
.kord__seg { position: relative; display: grid; place-items: center; min-height: 40px; padding: 6px 8px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted, #6e6862); cursor: pointer; text-align: center; transition: background .2s, color .2s; }
.kord__seg:hover { color: var(--ink, #111); }
.kord__seg.is-on { background: #e50000; color: #fff; }
.kord__seg.is-off { opacity: .4; cursor: not-allowed; }

.kord__pcs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.kord__pcs button { width: 40px; height: 40px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line, rgba(17, 17, 17, .15)); background: #fff; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink, #111); }
.kord__pcs button:hover:not(:disabled) { background: var(--ink, #111); color: #fff; }
.kord__pcs button:disabled { opacity: .35; cursor: not-allowed; }
.kord__pcs output { min-width: 28px; text-align: center; font-weight: 700; font-size: 18px; }
.kord__pcsnote { flex: 1 1 160px; font-size: 12.5px; color: var(--muted, #6e6862); line-height: 1.45; }

.kord__sum { background: #f7f4ef; border-radius: 14px; padding: 14px 16px; margin: 0; }
.kord__sumt { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink, #111); }
.kord__sum dl, dl.kord__sum { margin: 0; display: grid; gap: 6px; }
.kord__sum dl div, dl.kord__sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; line-height: 1.4; }
.kord__sum dt { color: var(--muted, #6e6862); margin: 0; }
.kord__sum dd { margin: 0; font-weight: 600; text-align: end; }
.kord__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(17, 17, 17, .1); font-weight: 600; }
.kord__total strong { font-size: clamp(24px, 2.4vw, 30px); color: #e50000; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.01em; display: inline-block; }
.kord__total strong.is-bump { animation: kord-bump .42s var(--ease, ease); }
@keyframes kord-bump { 0% { transform: scale(1); } 35% { transform: scale(1.06); } 100% { transform: scale(1); } }
.kord__fine { margin: 8px 0 0; font-size: 12px; color: var(--muted, #6e6862); line-height: 1.5; }

.kord__fld { display: grid; gap: 5px; font-size: 13.5px; }
.kord__fld > span b { font-weight: 600; }
.kord__fld > span i { color: #e50000; font-style: normal; }
.kord__fld > span em { font-style: normal; color: var(--muted, #6e6862); font-size: 12.5px; }
.kord__fld input, .kord__fld select { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(17, 17, 17, .15); background: #fff; font: inherit; font-size: 15px; color: var(--ink, #111); }
.kord__fld input:focus, .kord__fld select:focus { outline: none; border-color: var(--ink, #111); box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }
.kord__fld [aria-invalid="true"] { border-color: #e50000; box-shadow: 0 0 0 3px rgba(229, 0, 0, .1); }
.kord__fld input[dir="ltr"] { text-align: start; }
[dir="rtl"] .kord__fld input[dir="ltr"] { text-align: right; }
.kord__err { color: #e50000; font-size: 12.5px; min-height: 0; }
.kord__err:empty { display: none; }
.kord__hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kord__msg { margin: 0; font-size: 13.5px; color: #b80000; line-height: 1.5; }
.kord__msg:empty { display: none; }
.kord__msg:not(:empty) { background: #fff1f1; border-radius: 12px; padding: 10px 12px; }

.kord__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.kord__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 16px; border-radius: 12px; border: 0; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .2s, color .2s; }
.kord__btn--red { background: #e50000; color: #fff; box-shadow: 0 12px 28px -14px rgba(229, 0, 0, .8); }
.kord__btn--red:hover:not(:disabled) { background: var(--ink, #111); }
.kord__btn--red:disabled { opacity: .7; cursor: progress; }
.kord__btn--ghost { background: #fff; color: var(--ink, #111); box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, .25); }
.kord__btn--ghost:hover { background: var(--ink, #111); color: #fff; }
.kord__wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 12px; color: #128c4a; font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: inset 0 0 0 1.5px rgba(18, 140, 74, .35); }
.kord__wa:hover { background: #128c4a; color: #fff; }
.kord :focus-visible { outline: 2px solid #e50000; outline-offset: 2px; }

.kord__done { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 10px 0 4px; }
.kord__done[hidden] { display: none; }
.kord__done .kord__h { padding: 0; margin-top: 8px; }
.kord__done .kord__lead { max-width: 480px; margin: 0 auto 6px; font-size: 15.5px; color: var(--ink, #111); }
.kord__ref { margin: 0 0 12px; font-weight: 700; font-size: 14px; color: #e50000; font-variant-numeric: tabular-nums; }
.kord__sum--done { width: min(420px, 100%); text-align: start; margin-bottom: 16px; }
.kord__done .kord__acts { width: min(420px, 100%); }

@media (max-width: 699px) {
  .kord { padding: 0; place-items: end stretch; }
  .kord__dlg { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(40px); }
  .kord__dlg::before { content: ""; position: absolute; top: 8px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 4px; background: rgba(17, 17, 17, .15); }
  .kord__cols { grid-template-columns: 1fr; gap: 18px; }
  .kord__col + .kord__col { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line, rgba(17, 17, 17, .1)); padding-top: 16px; }
  .kord__x { top: 12px; }
  .kord__acts { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: #fff; padding: 10px 0 4px; margin-bottom: -4px; }
  .kord__done .kord__acts { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .kord__back, .kord__dlg { transition: none; }
  .kord__total strong.is-bump { animation: none; }
}
