/* Ishara · the request and contact pages (/demo/, /ar/demo/, /contact/, /ar/contact/).
 * The form markup comes from src/content/demo.mjs (requestForm, requestAside);
 * its behaviour from assets/pages/request.js. Tokens from knowledge.css. */

/* ---- layout: the form beside its aside ---------------------------------- */
.rq-section { padding-top: 8px !important; }
.rq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.rq-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px 32px 28px;
  scroll-margin-top: 96px;
}
.rq-title { margin: 0 0 6px; font-size: 26px; font-weight: 500; line-height: 1.2; color: var(--ink); letter-spacing: -0.01em; }
.rq-lead { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---- fields --------------------------------------------------------------- */
.rq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-bottom: 18px; }
.rq-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.rq-field > label,
.rq-set legend { font-size: 13.5px; font-weight: 600; color: var(--ink); padding: 0; }
.rq-opt { font-weight: 400; color: var(--faint); }
.rq-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #c9d8d3;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rq-input::placeholder { color: #7d9196; }
textarea.rq-input { min-height: 92px; resize: vertical; }
select.rq-input {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23365' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
[dir="rtl"] select.rq-input { background-position: left 14px center; }
.rq-input:hover { border-color: #a9c2bb; }
.rq-input:focus-visible { outline: none; border-color: var(--brand-a); box-shadow: 0 0 0 3px #007c8c2e; }
.rq-field.is-invalid .rq-input { border-color: var(--bad); }
.rq-error { margin: 0; font-size: 13px; color: var(--bad); line-height: 1.4; }
.rq-field[data-field="note"] { margin-bottom: 4px; }

/* ---- radio chips: what to see, and the language ------------------------- */
.rq-set { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.rq-set legend { margin-bottom: 9px; }
.rq-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-choice { position: relative; display: inline-flex; cursor: pointer; }
.rq-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rq-choice span {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #c9d8d3;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.3;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.rq-choice:hover span { border-color: #96b9b0; }
.rq-choice input:checked + span { background: var(--brand-tint); border-color: var(--brand-a); color: #0b5f69; font-weight: 600; }
.rq-choice input:focus-visible + span { outline: 2px solid var(--brand-a); outline-offset: 2px; }
.rq-set.is-invalid .rq-choice span { border-color: var(--bad); }
.rq-grid .rq-set { margin: 0; }
.rq-choices-row .rq-choice span { padding: 13px 18px; }

/* The honeypot: out of sight and out of the tab order. */
.rq-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---- submit ---------------------------------------------------------------- */
.rq-submit { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.rq-submit .btn { font-size: 14px; min-height: 50px; padding: 14px 24px; }
.rq-submit .btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.rq-send-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---- confirmation panel ---------------------------------------------------- */
.rq-done { text-align: start; padding: 6px 0 2px; }
.rq-done:focus { outline: none; }
.rq-done-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-a); margin-bottom: 16px; }
.rq-card .rq-done-title { margin: 0 0 8px; font-size: 24px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.rq-done-body, .rq-done-fallback { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.rq-done-fallback { color: var(--warn); }
.rq-done-mail { padding: 16px 18px; border-radius: var(--radius); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.rq-done-mail p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.rq-done-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rq-edit { margin-top: 16px; padding: 6px 0; border: 0; background: none; color: var(--brand-a); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rq-copied { margin: 8px 0 0; min-height: 1.2em; font-size: 13px; color: var(--good); }

/* ---- the aside --------------------------------------------------------------- */
.rq-aside { display: flex; flex-direction: column; gap: 14px; }
.rq-panel { padding: 22px 24px; border-radius: var(--radius); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.rq-panel h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--ink); }
.rq-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 9px; }
.rq-list li { position: relative; padding-inline-start: 22px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rq-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.5em; width: 9px; height: 5px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.rq-langline { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rq-langline b { color: var(--ink); }
.rq-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rq-next li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rq-next li span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--brand-a); font-size: 12px; font-weight: 650; }
.rq-explore { background: #fff; border-color: var(--line); }
.rq-explore p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* ---- the showcase and the four topics --------------------------------------- */
.rq-pane-desc { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.rq-showcase .showcase-tab { width: 100%; }
.rq-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rq-topic { display: flex; flex-direction: column; }
.rq-topic p { flex: 1; }
.rq-topic-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 6px; }
.rq-text-link { font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.rq-text-link:hover { color: var(--ink); }

/* ---- contact: the four doors and the closing lines ------------------------- */
.ct-doors .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ct-doors .ct-door h3 { min-height: 2.5em; }
.ct-door { display: flex; flex-direction: column; }
.ct-door p { flex: 1; }
.ie-page .ct-door-primary, .ct-door-primary { border-color: #8fc3bb; background: linear-gradient(180deg, #f1f9f6, #fff 70%); box-shadow: 0 0 0 1px #8fc3bb inset, var(--shadow-card); }
.ie-page .ct-door-primary .card-icon, .ct-door-primary .card-icon { background: var(--brand-a); color: #fff; }
.ct-door-primary .card-link { color: var(--brand-a); font-weight: 600; }
.ct-close { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 15px; line-height: 1.6; }
.ct-close p { margin: 0 0 10px; }

/* ---- smaller screens ----------------------------------------------------------- */
@media (max-width: 1080px) {
  .ct-doors .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rq-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .rq-card { padding: 22px 18px 20px; border-radius: var(--radius); }
  .rq-title { font-size: 22px; }
  .rq-grid { grid-template-columns: 1fr; gap: 14px; }
  .rq-topics, .ct-doors .card-grid { grid-template-columns: 1fr; }
  .ct-doors .ct-door h3 { min-height: 0; }
  .rq-submit .btn { width: 100%; justify-content: center; }
  .rq-panel { padding: 18px; }
  .rq-done-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rq-input, .rq-choice span { transition: none; }
}
.ct-steps { margin-top: 30px; }
