/* KyrgyzSat — header account actions + "Request access" / "Log in" modals.
 * Graphite surfaces; cyan only for the primary button, focus and the selected state. Logical properties → RTL.
 */

/* ---------- header actions ---------- */
.hdr-login, .hdr-request { white-space: nowrap; }
.hdr-login .i { width: 16px; height: 16px; }
.hdr-request { height: 40px; padding-inline: 16px; font-size: 14px; }
.m-login { display: none; }
@media (max-width: 1279px) {
  .hdr-login { width: 40px; padding: 0; justify-content: center; }
  .hdr-login span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 767px) {
  .hdr-login, .hdr-request { display: none; }
  .m-login { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--edge-2); background: rgba(10, 12, 15, .35); color: var(--t0); }
  .m-login .i { width: 20px; height: 20px; }
  .m-auth { display: grid; gap: 10px; }
}

/* ---------- modal shell ---------- */
.acc-lock, .acc-lock body { overflow: hidden; }
.acc-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; }
.acc-modal[hidden] { display: none; }
.acc-overlay { position: absolute; inset: 0; background: rgba(4, 5, 7, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s ease; }
.acc-panel { position: relative; display: grid; width: min(1000px, 100%); max-height: min(780px, calc(100dvh - 48px)); border-radius: 14px; border: 1px solid var(--edge-2); background: #101317; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8); overflow: hidden; opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .22s ease, transform .28s var(--ease); }
.acc-modal.is-open .acc-overlay { opacity: 1; }
.acc-modal.is-open .acc-panel { opacity: 1; transform: none; }
.acc-modal--request .acc-panel { grid-template-columns: 300px minmax(0, 1fr); height: min(760px, calc(100dvh - 48px)); }
.acc-modal--login .acc-panel { width: min(440px, 100%); }
@media (prefers-reduced-motion: reduce) { .acc-overlay, .acc-panel { transition: none; } }

/* side panel (natural imagery under a neutral scrim) */
.acc-side { position: relative; background: url("/assets/img/eco-800.webp") center / cover no-repeat, #15181e; border-inline-end: 1px solid var(--edge); }
.acc-side::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 15, .55), rgba(10, 12, 15, .92) 70%); }
.acc-side-inner { position: relative; height: 100%; display: flex; flex-direction: column; gap: 18px; padding: 30px 26px; }
.acc-side-emblem { width: 40px; height: 40px; }
.acc-side-title { margin-block-start: auto; font-family: var(--f-display); font-weight: 500; font-size: 21px; line-height: 1.25; color: var(--t0); }
html[lang="ar"] .acc-side-title { line-height: 1.5; font-weight: 600; }
.acc-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.acc-side li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--t1); }
.acc-side li .i { width: 16px; height: 16px; margin-top: 2px; color: var(--t0); }
.acc-side-note { font-size: 12.5px; line-height: 1.5; color: var(--t3); }

/* main column */
.acc-main { position: relative; display: flex; flex-direction: column; min-height: 0; }
.acc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 14px; }
.acc-kicker { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); margin-block-end: 6px; }
html[lang="ar"] .acc-kicker { font-size: 12px; letter-spacing: 0; text-transform: none; }
.acc-kicker--sub { margin: 6px 0 0; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 14px; }
.acc-title { font-family: var(--f-display); font-weight: 500; font-size: 26px; line-height: 1.2; letter-spacing: var(--track-display); color: var(--t0); }
html[lang="ar"] .acc-title { line-height: 1.45; font-weight: 600; }
.acc-x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--edge); background: none; color: var(--t1); cursor: pointer; transition: color .2s, border-color .2s; }
.acc-x:hover { color: var(--t0); border-color: var(--edge-2); }
.acc-x .i { width: 18px; height: 18px; }

/* progress */
.acc-steps { position: relative; list-style: none; margin: 0 28px 6px; padding: 0 0 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-bottom: 1px solid var(--edge); }
.acc-steps::after { content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; height: 2px; width: calc((var(--p, 0) * 2 + 1) / 3 * 100%); background: var(--cyan); transition: width .35s var(--ease); }
.acc-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--t3); }
.acc-steps-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--edge-2); font-family: var(--f-mono); font-size: 11px; }
.acc-steps li.is-current { color: var(--t0); }
.acc-steps li.is-current .acc-steps-n { border-color: var(--cyan); color: var(--cyan); }
.acc-steps li.is-done { color: var(--t1); }
.acc-steps li.is-done .acc-steps-n { background: var(--t1); border-color: var(--t1); color: #101317; }

/* form */
.acc-form { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 28px 8px; }
.acc-step { display: grid; gap: 18px; }
.acc-step[hidden] { display: none; }
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acc-field { display: grid; gap: 7px; align-content: start; }
.acc-field > label, .acc-label { font-size: 13px; font-weight: 600; color: var(--t1); }
.acc-field em, .acc-label em { font-style: normal; font-weight: 400; color: var(--t3); }
.acc-field input:not([type=radio]):not([type=checkbox]), .acc-field textarea {
  width: 100%; height: 48px; padding-inline: 14px; border-radius: 10px; border: 1px solid #30363f; background: #1b1f26; color: var(--t0); font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.acc-field textarea { height: auto; min-height: 112px; padding-block: 12px; resize: vertical; line-height: 1.5; }
.acc-field input::placeholder { color: #6f7889; }
[dir="rtl"] .acc-field input[dir="ltr"] { text-align: right; }
.acc-field input:focus, .acc-field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41, 230, 255, .16); background: #20252d; }
.acc-field input[aria-invalid="true"], .acc-field textarea[aria-invalid="true"] { border-color: #e88a7a; }
.acc-err { min-height: 0; margin: 0; font-size: 12.5px; color: #f0a596; }
.acc-err:empty { display: none; }
.hp { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset-inline-start: -9999px; }

/* org-type picker */
.acc-field--types { gap: 12px; }
.acc-tgroup { border: 0; margin: 0; padding: 0; min-width: 0; }
.acc-tgroup legend { padding: 0; margin-block-end: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); }
html[lang="ar"] .acc-tgroup legend { font-size: 12px; letter-spacing: 0; text-transform: none; }
.acc-tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.acc-type { position: relative; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; min-height: 54px; padding: 8px 30px 8px 10px; padding-inline: 10px 30px; border-radius: 10px; border: 1px solid var(--edge); background: #15181e; font-size: 13.5px; line-height: 1.3; color: var(--t1); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.acc-type:hover { border-color: var(--edge-2); color: var(--t0); }
.acc-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acc-type-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #1d2128; color: var(--t2); }
.acc-type-ico .i { width: 16px; height: 16px; }
.acc-type-check { position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); color: #0a0c0f; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.acc-type-check .i { width: 11px; height: 11px; stroke-width: 3; }
.acc-type:has(input:checked) { border-color: rgba(41, 230, 255, .7); background: #182027; color: var(--t0); }
.acc-type:has(input:checked) .acc-type-ico { color: var(--t0); }
.acc-type:has(input:checked) .acc-type-check { opacity: 1; transform: none; }
.acc-type:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.acc-field--types[aria-invalid="true"] .acc-type { border-color: rgba(232, 138, 122, .45); }

/* interest chips */
.acc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding-inline: 14px; border-radius: 100px; border: 1px solid var(--edge-2); font-size: 14px; color: var(--t1); cursor: pointer; transition: all .2s; }
.acc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acc-chip:hover { color: var(--t0); border-color: var(--t3); }
.acc-chip:has(input:checked) { background: var(--t0); border-color: var(--t0); color: #0a0c0f; }
.acc-chip:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* checkbox */
.acc-check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--t1); cursor: pointer; }
.acc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acc-box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid #48505c; background: #1b1f26; color: transparent; transition: all .15s; }
.acc-box .i { width: 14px; height: 14px; stroke-width: 3; }
.acc-check input:checked + .acc-box { background: var(--cyan); border-color: var(--cyan); color: #0a0c0f; }
.acc-check input:focus-visible + .acc-box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.acc-consent.has-err .acc-box { border-color: #e88a7a; }
.acc-check--sm { grid-template-columns: 20px 1fr; font-size: 14px; align-items: center; }
.acc-check--sm .acc-box { width: 20px; height: 20px; }

/* footer */
.acc-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px 20px; border-top: 1px solid var(--edge); background: #101317; }
.acc-status { flex: 1; min-width: 0; margin: 0; font-size: 13px; color: var(--t2); }
.acc-btns { display: flex; gap: 10px; margin-inline-start: auto; }
.acc-btns .btn { height: 46px; }
.acc-btns .btn[hidden] { display: none; }
.acc-btns .is-busy { opacity: .7; cursor: progress; }

/* done */
.acc-done { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 40px 28px; text-align: center; }
.acc-done[hidden] { display: none; }
.acc-done-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(41, 230, 255, .5); color: var(--cyan); }
.acc-done-ico .i { width: 26px; height: 26px; stroke-width: 2; }
.acc-done-text { max-width: 40ch; font-size: 15px; line-height: 1.6; color: var(--t1); overflow-wrap: anywhere; }

/* login */
.acc-main--login .acc-head { padding: 26px 26px 6px; }
.acc-lock-ico { display: grid; place-items: center; width: 40px; height: 40px; margin-block-end: 14px; border-radius: 12px; border: 1px solid var(--edge); background: #15181e; color: var(--t1); }
.acc-lock-ico .i { width: 18px; height: 18px; }
.acc-form--login { display: grid; gap: 16px; padding: 16px 26px 8px; overflow: visible; }
.acc-pass { position: relative; }
.acc-pass input { padding-inline-end: 48px !important; }
.acc-eye { position: absolute; top: 4px; inset-inline-end: 4px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--t2); cursor: pointer; }
.acc-eye:hover { color: var(--t0); }
.acc-eye .i { width: 18px; height: 18px; }
.acc-lrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-link { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 14px; color: var(--t1); text-decoration: underline; text-decoration-color: var(--edge-2); text-underline-offset: 3px; cursor: pointer; }
.acc-link:hover { color: var(--t0); text-decoration-color: var(--cyan); }
.acc-notice { display: grid; grid-template-columns: 18px 1fr; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--edge-2); background: #171b21; font-size: 13.5px; line-height: 1.5; color: var(--t1); }
.acc-notice[hidden] { display: none; }
.acc-notice .i { width: 18px; height: 18px; color: var(--t0); }
.acc-wide { width: 100%; justify-content: center; height: 50px; }
.acc-switch { margin: 0; padding: 14px 26px 24px; font-size: 14px; color: var(--t2); text-align: center; }
.acc-switch a { color: var(--t0); text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 3px; }

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .acc-modal--request .acc-panel { grid-template-columns: 1fr; }
  .acc-side { display: none; }
  .acc-tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- mobile: full-screen sheet ---------- */
@media (max-width: 767px) {
  .acc-modal { padding: 0; place-items: end stretch; }
  .acc-panel, .acc-modal--request .acc-panel, .acc-modal--login .acc-panel {
    /* the modal itself is pinned to the visual viewport by access.js; fill it */
    width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0;
    transform: translateY(24px);
  }
  .acc-modal--login .acc-panel { height: auto; max-height: 100%; border-radius: 18px 18px 0 0; border-top: 1px solid var(--edge-2); overflow-y: auto; }
  .acc-head { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; }
  .acc-title { font-size: 22px; }
  .acc-steps { margin-inline: 16px; }
  .acc-steps li { font-size: 12px; gap: 6px; }
  .acc-form { padding: 16px 16px 12px; }
  .acc-row { grid-template-columns: 1fr; }
  .acc-tgrid { grid-template-columns: 1fr; gap: 6px; }
  .acc-type { min-height: 52px; font-size: 14.5px; }
  .acc-field input:not([type=radio]):not([type=checkbox]) { height: 52px; }
  .acc-foot { position: sticky; bottom: 0; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .acc-status:empty { display: none; }
  .acc-btns { margin: 0; }
  .acc-btns .btn { flex: 1; height: 52px; justify-content: center; }
  .acc-btns .acc-back { flex: 0 0 auto; padding-inline: 18px; }
  .acc-main--login .acc-head { padding: 22px 16px 4px; }
  .acc-form--login { padding: 14px 16px 6px; }
  .acc-switch { padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
}
