/* alavi-core 0.3.34 — shared pieces from 18's answerer / estefta board v5 (owner-approved 2026-11-23,
   REQ-20261123-1812-18). One design everywhere (estefta, vojuhat, library, dashboard). Loaded after kit.css / kit-steps.css. */

/* 1 · Notice box — AC_UI::notice( title, items ). Cream, thin line, 3px gold line on the START side, short title with info icon. */
.ac-portal .ac-notice { margin: 0 0 16px; padding: 10px 14px; border: 1px solid #e6dbcb; border-inline-start: 3px solid #cc9952;
	border-radius: 12px; background: #fbf7f1; color: #53524f; font-size: 14px; line-height: 2; }
.ac-portal .ac-notice .ac-nh { display: flex; align-items: center; gap: 6px; color: #7a5222; }
.ac-portal .ac-notice .ac-nh b { font-size: 14px; font-weight: 700; }
.ac-portal .ac-notice .ac-nh svg { display: block; flex: none; margin-top: -.2em; }
.ac-portal[lang="en"] .ac-notice .ac-nh svg { margin-top: 0; }
.ac-portal .ac-notice ul { margin: 0; padding-inline-start: 18px; }
.ac-portal .ac-notice li { margin: 0; }

/* Service tabs (board artboards 1 / 1b / 1c): first row = cards, icon square above the label on the phone, beside it on
   desktop; a parent opens a second row of two full-width buttons. No chevrons. */
.ac-portal .ac-tt.ac-svc { gap: 8px; margin: 0 0 8px; }
.ac-portal .ac-tt.ac-svc a { flex-direction: row; gap: 10px; min-height: 56px; padding: 8px 10px; border-radius: 14px; color: var(--ac-title);
	font-size: 15px; font-weight: 600; line-height: 1.5; text-align: center; box-shadow: none; }
.ac-portal .ac-tt.ac-svc a .ac-ti { width: 32px; height: 32px; border-radius: 9px; background: var(--ac-soft); color: var(--ac-link); }
.ac-portal .ac-tt.ac-svc a.is-on { border: 1.5px solid var(--ac-primary); box-shadow: 0 2px 0 var(--ac-primary); font-weight: 700; }
.ac-portal .ac-tt.ac-svc a.is-on .ac-ti { background: var(--ac-primary); color: #fff; }
.ac-portal .ac-tt.ac-svc a.is-soon { color: var(--ac-muted); }
.ac-portal .ac-tt.ac-svc a.is-soon .ac-ti { background: #f4f0ea; color: #a39c91; }
.ac-portal .ac-tt.ac-svc a .ac-c-soon { height: 20px; padding: .25em 8px 0; font-size: 10.5px; font-weight: 700; line-height: 1; }
.ac-portal .ac-tt2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.ac-portal .ac-tt2 a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: .3em 8px 0;
	border: 1px solid var(--ac-line); border-radius: 12px; background: #fff; color: var(--ac-link); font-size: 14px; font-weight: 600;
	line-height: 1.5; text-align: center; text-decoration: none; }
.ac-portal[lang="en"] .ac-tt2 a { padding-top: 0; }
.ac-portal .ac-tt2 a .ac-ti { display: inline-flex; flex: none; margin-top: -.2em; }
.ac-portal[lang="en"] .ac-tt2 a .ac-ti { margin-top: 0; }
.ac-portal .ac-tt2 a.is-on { border-color: var(--ac-primary); color: var(--ac-title); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ac-primary); }
.ac-portal .ac-tt2 a:focus-visible,
.ac-portal .ac-tt.ac-svc a:focus-visible { outline: 2px solid var(--ac-gold); outline-offset: 2px; }

/* 2 · «پروندهٔ من» in the dashboard bar: see portal.css (0.3.34). */

/* 3 · Small round chips (answerer «منظور شما کدام است؟»): 34 high, touch area 44 kept by the pseudo-element. */
.ac-portal .ac-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-portal .ac-pick { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 34px; min-height: 34px;
	margin: 0; padding: .3em 14px 0; border: 1px solid #d9ccb8; border-radius: 999px; background: #fff; color: #7a5222; font: inherit;
	font-size: 13.5px; font-weight: 500; line-height: 1.5; text-decoration: none; cursor: pointer; }
.ac-portal[lang="en"] .ac-pick { padding-top: 0; }
.ac-portal .ac-pick::after { content: ""; position: absolute; inset: -5px 0; }
.ac-portal .ac-pick:hover,
.ac-portal .ac-pick:focus-visible { border-color: var(--ac-gold); background: #fbf7f1; outline: none; }

/* 4 · The book (risala «توضیح المسائل» / «جامع المسائل», «مناسک حج»): standalone in a cream circle; inline 16px before
   «توضیح المسائل · مسئلهٔ ۴۷» (the masale number inline after the title, no chip). */
.ac-portal .ac-bkico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px;
	border-radius: 50%; background: #f2eadf; color: #7a5222; }
.ac-portal .ac-src { display: inline-flex; align-items: center; gap: 6px; color: #7a5222; font-size: 13px; font-weight: 700; line-height: 1.7; }
.ac-portal .ac-src svg { display: block; flex: none; margin-top: -.15em; }
.ac-portal .ac-src .ac-nw { white-space: nowrap; } /* 0.3.35 (18's gate FIX 2): «مسئلهٔ ۴۷» stays together. */
/* 0.3.35 (18's gate FIX 3): a field after a row of fields keeps the same 12px gap as the others. */
.ac-portal .ac-grid2 + .ac-fld,
.ac-portal .ac-grid3 + .ac-fld,
.ac-portal :not(.ac-grid2):not(.ac-grid3) > .ac-fld + .ac-fld,
.ac-portal .ac-fld + .ac-grid2,
.ac-portal .ac-fld + .ac-grid3 { margin-top: 12px; }
.ac-portal .ac-grid3:has(> .ac-fld),
.ac-portal .ac-grid2:has(> .ac-fld) { align-items: stretch; column-gap: 16px; } /* a row of fields (SPEC §4: gap 16): labels on one line, */
.ac-portal .ac-grid3 > .ac-fld > .ac-tel,
.ac-portal .ac-grid2 > .ac-fld > .ac-tel { flex: 1 1 auto; } /* and the phone box as tall as its neighbours. */

/* 5 · Button placement: the primary action at the END (left in fa/ar). .ac-mid = system messages (centred on desktop,
   full width on the phone); .ac-two = feedback (centred on desktop, two columns on the phone). */
.ac-portal .ac-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ac-portal .ac-acts.ac-mid,
.ac-portal .ac-acts.ac-two { justify-content: center; }

/* 9 · Phone field country segment as on the live site: «ایران» + bold LTR «+۹۸» + small chevron, white, 1px divider. */
.ac-portal .ac-tel .ac-tel-cc:not(#ac-x) { background: #fff; color: #2b2a28; font-weight: 400; }
.ac-portal:not([lang="en"]) .ac-tel .ac-tel-cc:not(#ac-x) { direction: rtl; }
.ac-portal .ac-tel .ac-tel-cc .ac-tel-dc { font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.ac-portal .ac-tel .ac-tel-cc svg { width: 14px; height: 14px; color: #6e685e; }

@media (max-width: 640px) {
	.ac-portal .ac-tt.ac-svc a { flex-direction: column; gap: 4px; min-height: 72px; padding: 8px 4px 6px; font-size: 13px; }
	.ac-portal .ac-tt2 a { min-height: 46px; }
	.ac-portal .ac-acts:not(.ac-two) .ac-btn { flex: 1 1 100%; width: 100%; } /* board: phone actions full width. */
	.ac-portal .ac-acts.ac-two { display: grid; grid-template-columns: 1fr 1fr; }
	.ac-portal .ac-acts.ac-two .ac-btn { padding-inline: 8px; font-size: 13.5px; }
	/* 10 · Steps on the phone (three steps or fewer): every step keeps its label; the last («ثبت») narrower. */
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) { padding: 0; border: 0; background: none; gap: 6px; }
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) li { flex: 1 1 auto; width: auto; min-width: 0; min-height: 40px;
		padding: 0 8px; gap: 6px; border: 1px solid var(--ac-line);
		border-radius: 12px; background: #fff; font-size: 13px; }
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) li:first-child { flex-grow: 1.35; }
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) li:last-child { flex: 0 0 auto; padding-inline: 10px; }
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) li .ac-st-t { display: inline; min-width: 0; overflow: hidden; white-space: nowrap;
		text-overflow: ellipsis; } /* safe on very narrow phones; the board texts fit at 390. */
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) li .ac-st-n { width: 22px; height: 22px; font-size: 12px; }
	.ac-portal .ac-steps:not(:has(li:nth-child(4))) li.is-now { border-color: var(--ac-primary); background: #fff; }
}

/* §15 chat pieces (build-ref v3 SPEC §3) — one design for the answerer and the future expert chat. Visitor at the START
   (right in fa/ar), system at the END with a round avatar. */
.ac-portal .ac-chat { display: flex; flex-direction: column; gap: 18px; }
.ac-portal .ac-vq { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 85%; }
.ac-portal .ac-vq small { padding: 0 4px; color: var(--ac-muted); font-size: 12px; }
.ac-portal .ac-vq .ac-bb { padding: 10px 14px; border-radius: 16px; border-start-start-radius: 4px; background: var(--ac-soft);
	color: var(--ac-title); font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.ac-portal .ac-srow { display: flex; justify-content: flex-end; align-items: flex-start; gap: 10px; }
.ac-portal .ac-avt { order: 2; flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
	border-radius: 50%; background: var(--ac-primary); color: #fff; }
.ac-portal .ac-srow > .ac-sb { flex: 0 1 auto; display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: calc(100% - 44px);
	padding: 12px 14px; border: 1px solid var(--ac-line); border-radius: 16px; border-start-end-radius: 4px; background: #fff; }
.ac-portal .ac-srow > .ac-sb.ac-wide { flex: 1 1 auto; }
.ac-portal .ac-srow > .ac-sb.ac-tp { justify-content: center; height: 34px; padding: 0; border-color: #efe6d8; border-radius: 17px;
	border-start-end-radius: 4px; }
.ac-portal .ac-tdots { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.ac-portal .ac-tp .ac-tdots { height: 100%; padding: 0 14px; }
.ac-portal .ac-tdots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ac-gold);
	animation: ac-tdot 1.2s infinite ease-in-out; }
.ac-portal .ac-btn .ac-tdots i { background: #fff; }
.ac-portal .ac-tdots i:nth-child(2) { animation-delay: .2s; }
.ac-portal .ac-tdots i:nth-child(3) { animation-delay: .4s; }
@keyframes ac-tdot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ac-portal .ac-tdots i { animation: none; opacity: .7; } }
.ac-portal .ac-quote { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 6px; border: 1px solid var(--ac-line);
	border-inline-start: 3px solid #cc9952; border-radius: 12px; background: #fbf7f1; }
.ac-portal .ac-quote .ac-qh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-portal .ac-quote p { margin: 0; color: var(--ac-title); font-size: 15px; line-height: 2.05; text-align: start; }
.ac-portal .ac-quote .ac-qf { display: flex; justify-content: flex-end; }
.ac-portal .ac-quote .ac-qf a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--ac-link);
	font-size: 13px; font-weight: 700; text-decoration: none; }
.ac-portal .ac-btn.is-sel { border-color: var(--ac-primary); background: var(--ac-soft); color: var(--ac-link); font-weight: 700; }
.ac-portal .ac-srow > .ac-sb p { margin: 0; font-size: 14px; line-height: 1.95; color: var(--ac-body); }
.ac-portal .ac-acts.ac-two .ac-btn { white-space: nowrap; }
