/* Cookie preferences dialog — shared by iranjavan.com (--surface, --text…) and iranjavan.org (--ijo-…).
   Colours come from whichever site's tokens exist, so it follows each site's light/dark mode. */
.ijc {
	--ijc-bg: var(--surface, var(--ijo-surface, #fff));
	--ijc-field: var(--surface-2, var(--ijo-field, #f3f4f6));
	--ijc-text: var(--text, var(--ijo-text, #111827));
	--ijc-text-2: var(--text-2, var(--ijo-text-2, #4b5563));
	--ijc-text-3: var(--text-3, var(--ijo-text-3, #6b7280));
	--ijc-line: var(--line-strong, var(--ijo-line-2, rgba(0, 0, 0, .14)));
	--ijc-accent: var(--red, var(--ijo-red, #e0243c));
	width: min(640px, calc(100vw - 24px));
	max-height: min(92vh, 760px);
	margin: auto;
	padding: 0;
	border: 1px solid var(--ijc-line);
	border-radius: 22px;
	background: var(--ijc-bg);
	color: var(--ijc-text);
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
	font: inherit;
	overflow: auto;
}
.ijc::backdrop { background: rgba(5, 8, 15, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ijc[open] { animation: ijc-in .22s cubic-bezier(.22, .8, .2, 1); }
@keyframes ijc-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .ijc[open] { animation: none; } }

.ijc__panel { display: grid; }
.ijc__fa, .ijc__en { display: block; }
.ijc__en { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: right; } /* lines up with the Persian above it */

.ijc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid var(--ijc-line); }
.ijc__title { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.5; }
.ijc__title .ijc__en { font-size: .95rem; font-weight: 700; color: var(--ijc-text-2); }
.ijc__intro { margin: 8px 0 0; color: var(--ijc-text-2); font-size: .93rem; line-height: 1.9; }
.ijc__intro .ijc__en { font-size: .82rem; line-height: 1.6; color: var(--ijc-text-3); margin-top: 2px; }

.ijc__x { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ijc-line); background: transparent; color: var(--ijc-text-2); cursor: pointer; }
.ijc__x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (hover: hover) { .ijc__x:hover { color: var(--ijc-text); background: var(--ijc-field); } }

.ijc__opts { display: grid; gap: 12px; padding: 18px 24px; }
.ijc__opt { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1px solid var(--ijc-line); border-radius: 16px; background: color-mix(in srgb, var(--ijc-field) 60%, transparent); cursor: pointer; }
.ijc__opt.is-locked { cursor: default; }
.ijc__opt input { flex: none; width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--ijc-accent); cursor: inherit; }
.ijc__opt-text { display: grid; gap: 4px; min-width: 0; }
.ijc__name { font-weight: 800; font-size: 1rem; line-height: 1.6; }
.ijc__name .ijc__en { font-size: .86rem; font-weight: 600; color: var(--ijc-text-2); }
.ijc__desc { color: var(--ijc-text-2); font-size: .88rem; line-height: 1.8; }
.ijc__desc .ijc__en { font-size: .8rem; line-height: 1.5; color: var(--ijc-text-3); }

.ijc__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; padding: 16px 24px 22px; border-top: 1px solid var(--ijc-line); }
.ijc__btn { display: inline-grid; justify-items: center; align-content: center; min-height: 48px; padding: 4px 18px; border-radius: 999px; border: 1px solid var(--ijc-line); background: transparent; color: var(--ijc-text); font: inherit; font-weight: 700; font-size: .92rem; line-height: 1.35; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.ijc__btn .ijc__en { font-size: .72rem; font-weight: 600; opacity: .8; text-align: center; }
@media (hover: hover) { .ijc__btn:hover { background: var(--ijc-field); } }
.ijc__btn:active { transform: scale(.97); }
.ijc__btn--primary { background: var(--ijc-accent); border-color: var(--ijc-accent); color: #fff; }
@media (hover: hover) { .ijc__btn--primary:hover { background: color-mix(in srgb, var(--ijc-accent) 88%, #000); } }
.ijc__btn--reject { color: var(--ijc-accent); border-color: color-mix(in srgb, var(--ijc-accent) 45%, transparent); background: color-mix(in srgb, var(--ijc-accent) 8%, transparent); }
.ijc :focus-visible { outline: 3px solid color-mix(in srgb, var(--ijc-accent) 70%, #fff); outline-offset: 2px; }

@media (max-width: 560px) {
	.ijc { width: calc(100vw - 16px); border-radius: 20px; }
	.ijc__head, .ijc__opts, .ijc__actions { padding-inline: 16px; }
	.ijc__actions { display: grid; grid-template-columns: 1fr 1fr; }
	.ijc__btn--primary { grid-column: 1 / -1; order: -1; }
}
