/* The checkout (/buy) and the account page (/account): the licence as a pass
   you own, on a quiet paper page with hairlines instead of boxes. Loaded after
   styles.css, which brings the fonts, the nav and the footer. */

:root {
  --paper: #faf9f6;
  --hair: #e4e1da;
  --hair-2: #d6d2c8;
  --dark: #16181d;
  --mute: #6b6f78;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
body { background: var(--paper); color: var(--dark); font-size: 16px; line-height: 1.8; }
:root[dir='rtl'] body { font-size: 16px; line-height: 1.8; }
[data-lang-block] { display: none; }
:root[lang='ar'] [data-lang-block='ar'], :root[lang='en'] [data-lang-block='en'] { display: block; }
:root[lang='ar'] span[data-lang-block='ar'], :root[lang='en'] span[data-lang-block='en'] { display: inline; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; color: var(--mute); }
.footer { border-top-color: var(--hair); }

/* Several blocks here set their own display, which would otherwise beat `hidden`. */
[hidden] { display: none !important; }

.page { padding: calc(var(--nav-h) + 56px) 0 80px; min-height: 78vh; }
.wide { width: min(1120px, 100% - 40px); margin-inline: auto; }
.mute { color: var(--mute); }
.num { font-family: 'Manrope', sans-serif; font-feature-settings: 'tnum'; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nav-link { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.nav-link:hover { color: var(--blue); }

/* buttons and fields */
.b {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, opacity .2s;
}
.b:active { transform: scale(.98); }
.b[disabled] { opacity: .55; cursor: default; }
.b-dark { background: var(--dark); color: #fff; }
.b-dark:hover { background: #000; }
.b-line { border-color: var(--hair-2); background: transparent; color: var(--dark); }
.b-line:hover { background: #fff; }
.b-block { width: 100%; padding-block: 15px; }
.link { color: var(--blue); font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; color: var(--mute); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--hair-2);
  background: #fff; font: inherit; color: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--dark); box-shadow: 0 0 0 3px rgba(22, 24, 29, .08); }
.field textarea { resize: vertical; min-height: 120px; }
.msg { padding: 11px 14px; border-radius: 10px; font-size: 14.5px; }
.msg-bad { background: #fdecec; color: #a12626; }
.msg-good { background: #e7f6ee; color: #136b41; }
.msg[hidden] { display: none; }

/* ---------- the pass ---------- */
.pass {
  position: relative; border-radius: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, #2f6bff 0%, #1a2a6b 45%, #0e1433 100%);
  box-shadow: 0 30px 60px -25px rgba(14, 20, 51, .55);
}
:root[dir='ltr'] .pass { background: radial-gradient(120% 90% at 0% 0%, #2f6bff 0%, #1a2a6b 45%, #0e1433 100%); }
.pass-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 28px 0; }
.pass-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pass-brand img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
.pass-kind { font-size: 13px; opacity: .78; }
.pass-name { padding: 26px 28px 0; font-size: 24px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.pass-code { padding: 6px 28px 24px; font: 700 clamp(17px, 2.3vw, 25px)/1.5 var(--mono); letter-spacing: .1em; direction: ltr; text-align: end; white-space: nowrap; }
:root[dir='ltr'] .pass-code { text-align: start; }
.pass-code.dim { opacity: .5; }
.pass-cut { position: relative; border-top: 2px dashed rgba(255, 255, 255, .28); }
.pass-cut::before, .pass-cut::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); }
.pass-cut::before { right: -12px; }
.pass-cut::after { left: -12px; }
.pass-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 28px 24px; }
.pass-meta small { display: block; font-size: 12px; opacity: .65; }
.pass-meta b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.pass.off, :root[dir='ltr'] .pass.off { background: linear-gradient(140deg, #5b6070, #2c2f3a); }
.pass.empty, :root[dir='ltr'] .pass.empty { background: linear-gradient(140deg, #8a8fa0, #565b6b); box-shadow: none; }

/* ---------- two columns ---------- */
.cols { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.cols h1 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.3; }
:root[dir='rtl'] .cols h1 { font-weight: 600; }

/* ---------- checkout ---------- */
.sum-rows { display: grid; gap: 10px; margin-top: 26px; }
.sum-rows > div { display: flex; justify-content: space-between; gap: 12px; }
.sum-rows .total { padding-top: 14px; border-top: 1px solid var(--hair); font-weight: 700; font-size: 20px; }
.sum-note { margin-top: 14px; font-size: 13.5px; color: var(--mute); }
.pay { padding: 26px; border: 1px solid var(--hair); border-radius: 18px; background: #fff; }
.pay h2 { font-size: 20px; margin-bottom: 14px; }
:root[dir='rtl'] .pay h2 { font-weight: 600; }
.pay-frame { min-height: 420px; }
.pay-wait { display: grid; place-items: center; min-height: 420px; color: var(--mute); font-size: 14.5px; }
.pay-foot { margin-top: 14px; font-size: 12.5px; color: var(--mute); line-height: 1.7; }
.pay-foot a { text-decoration: underline; text-underline-offset: 3px; }
.done { text-align: center; padding: 26px 8px; display: grid; gap: 14px; justify-items: center; }
.done-mark { width: 62px; height: 62px; border-radius: 50%; background: #e7f6ee; display: grid; place-items: center; }
.done h2 { font-size: 24px; }
.done code { font: 600 14px var(--mono); padding: 4px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--hair); }

/* ---------- sign-in ---------- */
.auth { width: min(440px, 100% - 40px); margin-inline: auto; }
.auth h1 { font-size: 30px; line-height: 1.3; }
:root[dir='rtl'] .auth h1 { font-weight: 600; }
.auth-card { margin-top: 22px; padding: 28px; border: 1px solid var(--hair); border-radius: 18px; background: #fff; display: grid; gap: 16px; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #efede7; }
.tabs button { flex: 1; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14.5px; cursor: pointer; color: var(--mute); }
.tabs button.on { background: #fff; color: var(--dark); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.code-input { text-align: center; font: 700 28px/1.2 var(--mono) !important; letter-spacing: .4em; direction: ltr; padding-block: 14px !important; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

/* ---------- the account ---------- */
.acc-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.acc-head p { font-size: 14.5px; }
.acc-head > button { white-space: nowrap; flex: none; }
.acc-head > div { min-width: 0; }
.pass-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.lic + .lic { margin-top: 30px; }
.list > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.list > div:first-child { border-top: 1px solid var(--hair); }
.list b { font-weight: 600; }
.list p { font-size: 14.5px; }
.help { margin-top: 30px; display: grid; gap: 12px; }
.help h2 { font-size: 20px; }
:root[dir='rtl'] .help h2, :root[dir='rtl'] .done h2 { font-weight: 600; }
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #efede7; width: max-content; max-width: 100%; }
.seg button { padding: 6px 18px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14px; cursor: pointer; color: var(--mute); }
.seg button.on { background: #fff; color: var(--dark); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.shots { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.shot { position: relative; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; border: 1px solid var(--hair-2); background: #fff; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot button { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(22, 24, 29, .8); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.shot-add { width: 74px; height: 74px; border-radius: 12px; border: 1px dashed var(--hair-2); background: transparent; color: var(--mute); font-size: 26px; cursor: pointer; display: grid; place-items: center; }
.shot-add:hover { background: #fff; color: var(--dark); }
.shots-note { font-size: 13px; color: var(--mute); }
.name-edit { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.name-edit input { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--hair-2); font: inherit; background: #fff; min-width: 0; }

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; gap: 30px; }
  .page { padding-top: calc(var(--nav-h) + 30px); }
  .pass-name { font-size: 21px; }
  .pass-top, .pass-name, .pass-code, .pass-meta { padding-inline: 20px; }
  .pay { padding: 20px 16px; }
}
@media (max-width: 420px) {
  .pass-meta { grid-template-columns: 1fr 1fr; }
  .pass-code { letter-spacing: .04em; }
}
