/* عکاسخانه — product studio box. Quiet WP controls; the darkroom tray is the one bold element. */
.akk-studio {
	--akk-ink: #1d2327;
	--akk-muted: #646970;
	--akk-line: #dcdcde;
	--akk-blue: #2271b1;
	--akk-room: #17191c;
	--akk-safelight: 255, 166, 77;
	--akk-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--akk-press: 160ms;
	font-family: Vazirmatn, Vazir, "IRANSansX", Tahoma, sans-serif;
	color: var(--akk-ink);
}
.akk-studio button { font-family: inherit; }

.akk-studio__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 4px; }
.akk-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f0f6fc; color: var(--akk-blue); font-size: 12px; }
.akk-studio__settings { font-size: 12px; }
.akk-empty { margin: 12px 0; color: var(--akk-muted); line-height: 2; }

.akk-step { margin-top: 18px; }
.akk-step__title { margin: 0 0 8px; font-size: 13px; font-weight: 700; }

/* Pressables share one tactile response */
.akk-source, .akk-scene, .akk-tab, .akk-shot .button, .akk-generate { transition: transform var(--akk-press) var(--akk-ease-out); }
.akk-source:active, .akk-scene:active, .akk-tab:active, .akk-shot .button:active, .akk-generate:active:not(:disabled) { transform: scale(0.97); }

/* Source photos */
.akk-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.akk-source { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; line-height: 0; overflow: hidden; box-shadow: 0 0 0 1px var(--akk-line); }
.akk-source img { width: 64px; height: 64px; object-fit: cover; }
.akk-source[aria-pressed="true"] { border-color: var(--akk-blue); box-shadow: none; }
.akk-source:focus-visible, .akk-tab:focus-visible, .akk-scene:has(input:focus-visible), .akk-link:focus-visible { outline: 2px solid var(--akk-blue); outline-offset: 2px; }

/* Group tabs: one row that scrolls sideways instead of wrapping into a wall of chips */
.akk-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; }
.akk-tab { flex: none; padding: 6px 12px; border: 1px solid var(--akk-line); border-radius: 999px; background: #fff; color: var(--akk-ink); font-size: 12px; cursor: pointer; white-space: nowrap; transition-property: transform, background-color, border-color, color; transition-duration: var(--akk-press), 150ms, 150ms, 150ms; }
.akk-tab span { color: var(--akk-muted); margin-inline-start: 2px; }
.akk-tab[aria-selected="true"] { background: var(--akk-ink); border-color: var(--akk-ink); color: #fff; }
.akk-tab[aria-selected="true"] span { color: #c3c4c7; }

/* Scene cards */
.akk-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.akk-scene { position: relative; display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--akk-line); border-radius: 8px; background: #fff; font-size: 13px; line-height: 1.7; cursor: pointer; transition-property: transform, border-color, background-color; transition-duration: var(--akk-press), 150ms, 150ms; }
.akk-scene input { position: absolute; opacity: 0; pointer-events: none; }
.akk-scene:has(input:checked) { border-color: var(--akk-blue); background: #f0f6fc; box-shadow: inset 0 0 0 1px var(--akk-blue); }
/* Entering cards after a tab switch: short stagger so the swap doesn't jump */
.akk-panel.is-entering .akk-scene { animation: akk-in 180ms var(--akk-ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes akk-in { from { opacity: 0; transform: translateY(4px); } }

@media (hover: hover) and (pointer: fine) {
	.akk-scene:hover, .akk-tab:not([aria-selected="true"]):hover { border-color: #8c8f94; }
	.akk-source:hover { box-shadow: 0 0 0 1px #8c8f94; }
}

/* Learn panel: the Persian meaning of the selected prompt */
.akk-learn { margin-top: 12px; padding: 10px 14px; border-inline-start: 3px solid var(--akk-blue); background: #f6f7f7; border-radius: 0 6px 6px 0; max-width: 72ch; }
.akk-learn .akk-fa { margin: 0; line-height: 2; transition: opacity 200ms ease, filter 200ms ease; }
.akk-learn.is-swapping .akk-fa { opacity: 0; filter: blur(2px); }
.akk-learn details { margin-top: 6px; }
.akk-learn summary { cursor: pointer; color: var(--akk-muted); font-size: 12px; }
.akk-learn .akk-en { margin: 6px 0 0; color: var(--akk-muted); font-size: 12px; line-height: 1.7; text-align: left; }
.akk-link { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--akk-blue); font-size: 12px; text-decoration: underline; cursor: pointer; }

.akk-custom-label { display: block; margin: 8px 0 6px; font-weight: 600; }
.akk-studio textarea { width: 100%; max-width: 72ch; }
.akk-tip { margin: 6px 0 0; max-width: 72ch; color: var(--akk-muted); font-size: 12px; line-height: 2; }

/* Action bar */
.akk-actionbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.akk-studio .akk-generate { min-width: 140px; min-height: 36px; font-size: 14px; }
.akk-generate.is-busy .akk-generate__label::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-end: 8px; vertical-align: -1px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: akk-spin 600ms linear infinite; }
@keyframes akk-spin { to { transform: rotate(360deg); } }
.akk-status { font-size: 13px; color: var(--akk-muted); }
.akk-status.is-error { color: #d63638; }

/* Darkroom tray */
.akk-darkroom { margin: 18px -12px -12px; padding: 16px 12px 18px; background: var(--akk-room); border-radius: 0 0 4px 4px; }
.akk-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.akk-shot { display: flex; flex-direction: column; gap: 8px; color: #e8e8e8; transition: opacity 250ms var(--akk-ease-out), transform 250ms var(--akk-ease-out); }
@starting-style { .akk-shot { opacity: 0; transform: translateY(8px); } }
.akk-shot__frame { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #0e0f11; }
.akk-shot__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.akk-shot__label { font-size: 12px; color: #a7aaad; }

/* Developing: source dims, a safelight band sweeps, seconds tick */
.akk-shot.is-developing .akk-shot__frame img { filter: grayscale(1) brightness(.45) blur(1px); }
.akk-shot.is-developing .akk-shot__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(var(--akk-safelight), .28), transparent); width: 45%; animation: akk-sweep 1.6s linear infinite; }
@keyframes akk-sweep { from { transform: translateX(-110%); } to { transform: translateX(250%); } }
.akk-develop-note { position: absolute; inset-inline: 12px; bottom: 12px; z-index: 1; font-size: 12px; line-height: 1.9; color: rgb(var(--akk-safelight)); }
.akk-develop-note b { display: block; font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

/* The one moment of delight: the result develops into color */
.akk-shot__new { transition: filter 600ms var(--akk-ease-out), transform 600ms var(--akk-ease-out), opacity 300ms ease; }
.akk-shot__new.is-latent { filter: blur(14px) grayscale(1) brightness(.6); transform: scale(1.03); opacity: .6; }

/* Before / after: the original sits on top, clipped from the end side by the slider */
.akk-shot__old { clip-path: inset(0 var(--cut, 50%) 0 0); }
.akk-shot__divider { position: absolute; top: 0; bottom: 0; right: var(--cut, 50%); width: 2px; margin-right: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: none; }
.akk-shot__divider::after { content: ""; position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 6l-4 4 4 4M13 6l4 4-4 4' fill='none' stroke='%231d2327' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.akk-shot__compare { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; direction: ltr; }
.akk-shot__compare:focus-visible + .akk-shot__divider::after { outline: 2px solid #72aee6; outline-offset: 2px; }
.akk-shot__tag { position: absolute; top: 8px; z-index: 1; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; pointer-events: none; }
.akk-shot__tag--old { left: 8px; }
.akk-shot__tag--new { right: 8px; }

.akk-shot__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.akk-shot .button { min-height: 30px; }
.akk-shot .button:not(.button-primary):not(.is-done) { background: #2c3338; border-color: #50575e; color: #f0f0f1; }
.akk-shot .button:not(.button-primary):not(.is-done):hover { background: #3c434a; border-color: #8c8f94; color: #fff; }
.akk-shot .button.is-done { background: #00a32a; border-color: #00a32a; color: #fff; }
.akk-btn-text { display: inline-block; transition: opacity 200ms ease, filter 200ms ease; }
.akk-btn-text.is-swapping { opacity: 0; filter: blur(2px); }
.akk-shot__error { padding: 10px; border: 1px solid rgba(214, 54, 56, .6); border-radius: 6px; color: #f2b8b5; font-size: 12px; line-height: 1.9; }

@media (max-width: 782px) {
	.akk-scenes { grid-template-columns: 1fr 1fr; }
	.akk-shots { grid-template-columns: 1fr; }
}

/* Reduced motion: keep fades that explain state, drop movement */
@media (prefers-reduced-motion: reduce) {
	.akk-source, .akk-scene, .akk-tab, .akk-shot .button, .akk-generate, .akk-shot { transition-property: opacity, background-color, border-color, color; }
	.akk-source:active, .akk-scene:active, .akk-tab:active, .akk-shot .button:active, .akk-generate:active:not(:disabled) { transform: none; }
	.akk-panel.is-entering .akk-scene { animation-name: akk-fade; animation-delay: 0ms; }
	@keyframes akk-fade { from { opacity: 0; } }
	.akk-shot.is-developing .akk-shot__frame::after { animation: none; background: rgba(var(--akk-safelight), .12); width: 100%; }
	.akk-shot__new { transition: opacity 300ms ease; }
	.akk-shot__new.is-latent { filter: none; transform: none; opacity: 0; }
	@starting-style { .akk-shot { transform: none; } }
	.akk-generate.is-busy .akk-generate__label::before { animation-duration: 1.5s; }
}

/* Color variants */
.akk-variants { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--akk-line); }
.akk-variants__lead { margin: 0 0 10px; max-width: 72ch; color: var(--akk-muted); line-height: 2; }
.akk-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.akk-swatches li { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px 4px 12px; border: 1px solid var(--akk-line); border-radius: 999px; font-size: 12px; }
.akk-swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.akk-swatch[data-nohex] { background: conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c); }
.akk-variants__actions { display: flex; align-items: center; gap: 10px; margin: 0; }
.akk-variants__cost { color: var(--akk-muted); font-size: 12px; }
