/*
 * profile-designer.css — the Bot Settings "Profile" tab (owner 2026-10-10): collapsible sections beside a live xat
 * preview. The preview stage follows the xat client research (plans/agent-reports/2026-10-10-profile-designer.md in
 * dev-ai-brain): 30px square avatars drawn "contain", sans 14px/16px names and messages, 10px bold status lines,
 * 20px pool buttons with a 3px gap (xat's default button grey #C8C8C8), a 330px popup with a 30px title bar and
 * 2-column 30px buttons, a 3.8:1 profile band and the 80px zoom-size avatar.
 */

.arc-pd [hidden] { display: none !important; }

/* ---------- layout: sections | sticky preview (>= 992px), preview first and pinned (< 768px) ---------- */
.arc-pd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.arc-pd-sections { min-width: 0; }
@media (min-width: 992px) {
	.arc-pd { grid-template-columns: minmax(0, 1fr) 320px; }
	.arc-pd-preview { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; }
}
@media (max-width: 991.98px) {
	.arc-pd-preview { order: -1; }
}

/* ---------- sections (<details>) ---------- */
.arc-pd-sec {
	border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; margin-bottom: 10px;
	background: rgba(0,0,0,0.10);
}
.arc-pd-sec-head {
	display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
	padding: 11px 14px; border-radius: 8px; min-height: 44px; user-select: none;
}
.arc-pd-sec-head::-webkit-details-marker { display: none; }
.arc-pd-sec-head::marker { content: ""; }
.arc-pd-sec-head:hover { background: rgba(255,255,255,0.04); }
.arc-pd-sec-head:focus-visible { outline: 2px solid var(--arc-accent, #4c84ff); outline-offset: 2px; }
.arc-pd-sec-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: .8; }
.arc-pd-sec-title { font-weight: 600; white-space: nowrap; }
.arc-pd-sec-sum {
	flex: 1; min-width: 0; color: rgba(255,255,255,0.5); font-size: 0.8rem;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.arc-pd-sec-sum:not(:empty)::before { content: "\00b7\00a0"; }
.arc-pd-sec-chev { width: 16px; height: 16px; flex-shrink: 0; transition: transform .15s; opacity: .7; }
.arc-pd-sec[open] > .arc-pd-sec-head .arc-pd-sec-chev { transform: rotate(180deg); }
.arc-pd-sec[open] > .arc-pd-sec-head { border-bottom: 1px solid rgba(255,255,255,0.06); border-radius: 8px 8px 0 0; }
.arc-pd-sec-body { padding: 14px; }
.arc-pd-sec-body > .arc-field-box:last-child, .arc-pd-sec-body > .form-group:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .arc-pd-sec-chev { transition: none; } }

/* ---------- avatar tools ---------- */
.arc-pd-avatar-tools { margin-top: 10px; }
.arc-pd-avatar-check { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.arc-pd-avatar-msg { color: rgba(255,255,255,0.6); }
.arc-pd-avatar-msg.is-ok { color: #10b759; }
.arc-pd-avatar-msg.is-warn { color: #ffc107; }
.arc-pd-avatar-msg.is-error { color: #ff6b6b; font-weight: 600; }
.arc-pd-defav { margin-top: 8px; }
.arc-pd-defav > summary { cursor: pointer; font-size: .85rem; color: var(--arc-accent, #7eb8f7); padding: 6px 0; }
.arc-pd-defav-bar { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.arc-pd-defav-range { min-width: 90px; text-align: center; }
.arc-pd-defav-num { width: 90px !important; margin-left: auto; }
.arc-pd-defav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; margin-bottom: 6px; }
.arc-pd-defav-item {
	width: 40px; height: 40px; padding: 4px; border-radius: 6px; cursor: pointer;
	border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.92);
}
.arc-pd-defav-item img { width: 30px; height: 30px; object-fit: contain; display: block; }
.arc-pd-defav-item[aria-pressed="true"] { outline: 2px solid var(--arc-accent, #4c84ff); outline-offset: 1px; }
.arc-pd-defav-item.is-missing { opacity: .25; }

/* ---------- name style picker (the /tools widgets inline, complete: controls, sample name, large live preview) ---------- */
.arc-pd-seg { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.arc-pd-seg > button {
	border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: inherit;
	border-radius: 16px; padding: 4px 12px; font-size: .82rem; min-height: 32px; cursor: pointer;
}
.arc-pd-seg > button[aria-checked="true"] { background: var(--arc-accent, #4c84ff); border-color: transparent; color: #fff; }
.arc-pd-widget .arct-panel { margin: 0 0 10px; }
.arc-pd-swatch { width: 38px; height: 34px; padding: 2px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.18); background: transparent; cursor: pointer; }

/* ---------- profile-card themes ---------- */
.arc-pd-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; margin-bottom: 12px; }
.arc-pd-theme {
	display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px; cursor: pointer;
	border: 1px solid rgba(255,255,255,0.10); border-radius: 6px; background: rgba(255,255,255,0.03); color: inherit;
}
.arc-pd-theme[aria-pressed="true"] { border-color: var(--arc-accent, #4c84ff); box-shadow: 0 0 0 1px var(--arc-accent, #4c84ff); }
.arc-pd-theme-sw { display: block; height: 26px; border-radius: 4px; position: relative; overflow: hidden; }
.arc-pd-theme-sw.is-none { background: repeating-linear-gradient(45deg, #3a3f4b 0 6px, #2f3540 6px 12px); }
.arc-pd-theme-name { font-size: .7rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc-pd-code { font-size: .8rem; padding: 6px 8px; border-radius: 4px; background: rgba(0,0,0,0.25); word-break: break-all; }

/* ---------- the preview ---------- */
.arc-pd-preview {
	border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px;
	background: rgba(0,0,0,0.18);
}
.arc-pd-pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.arc-pd-pv-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: rgba(255,255,255,0.6); display: inline-flex; align-items: center; gap: 5px; }
.arc-pd-pv-title svg { width: 13px; height: 13px; }
.arc-pd-pv-rank { width: auto !important; max-width: 140px; height: 28px !important; padding: 2px 6px !important; font-size: .78rem !important; }
.arc-pd-pv-note { margin-top: 8px; font-size: .72rem; }

/* xat look: a room background with light translucent panels, sans text, black by default */
.arc-pd-xat {
	display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 6px; padding: 6px; border-radius: 6px;
	background: linear-gradient(160deg, #3d5a80 0%, #293d5c 55%, #1d2b44 100%);
	font-family: Helvetica, Arial, sans-serif; color: #000;
}
.arc-pd-chat, .arc-pd-panel { background: rgba(245,245,247,0.86); border-radius: 5px; min-width: 0; }
.arc-pd-chat { padding: 6px 6px 2px; display: flex; flex-direction: column; justify-content: flex-end; }
.arc-pd-msg { display: flex; gap: 6px; min-height: 35px; margin-bottom: 4px; font-size: 14px; line-height: 16px; }
.arc-pd-msg-body { min-width: 0; padding-top: 1px; }
.arc-pd-msg-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.arc-pd-msg-text { word-break: break-word; }
.arc-pd-av {
	display: inline-block; flex-shrink: 0; background-repeat: no-repeat; background-position: center; background-size: contain;
}
.arc-pd-av-30 { width: 30px; height: 30px; }
.arc-pd-av-80 { width: 80px; height: 80px; }
.arc-pd-av.is-empty { background-image: none; outline: 1px dashed rgba(0,0,0,0.18); outline-offset: -1px; }
.arc-pd-avatar-tools .arc-pd-av.is-empty { outline-color: rgba(255,255,255,0.25); }
.arc-pd-avatar-tools .arc-pd-av { background-color: rgba(255,255,255,0.9); border-radius: 2px; }
.arc-pd-pawn { width: 13px; height: 19px; flex-shrink: 0; image-rendering: auto; }
.arc-pd-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.arc-pd-name .arct-preview-glowwrap { isolation: isolate; max-width: 100%; }
.arc-pd-name .arct-preview-name {
	font-size: inherit; font-weight: inherit; line-height: inherit; text-align: left; white-space: nowrap;
	overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; vertical-align: bottom;
}
.arc-pd-name-plain { color: #000; }
.arc-pd-hat {
	display: inline-block; font-size: 9px; line-height: 12px; font-weight: 700; padding: 0 4px; border-radius: 6px;
	border: 2px solid #3c00ff; background: #fff; color: #333; white-space: nowrap; flex-shrink: 0;
}

/* right panel: room name, user list, pool buttons */
.arc-pd-panel { padding: 4px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 16px; }
.arc-pd-room { font-weight: 700; font-size: 13px; padding: 2px 4px 4px; border-bottom: 1px solid rgba(0,0,0,0.1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-pd-users { list-style: none; margin: 0; padding: 0; flex: 1; }
.arc-pd-user { display: flex; align-items: flex-start; gap: 4px; padding: 3px 2px; min-height: 20px; }
.arc-pd-user .arc-pd-pawn { margin-top: 0; }
.arc-pd-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.arc-pd-user.is-stealth { opacity: .35; }
/* One line, always: a status effect (the typing caret, wave, slides) never wraps or changes the preview height. */
.arc-pd-status-wrap { display: block; position: relative; overflow: hidden; height: 13px; width: 100%; white-space: nowrap; text-overflow: clip; margin-top: 0 !important; }
/* (margin-top: arctools' typing effect nudges the line up 1px; here the line keeps its place for every effect) */
.arc-pd-status { display: inline-block; font-size: 10px; line-height: 13px; font-weight: 700; color: #000; white-space: nowrap; }
.arc-pd-pools { display: flex; flex-direction: column; gap: 3px; }
.arc-pd-poolbtn {
	display: block; height: 20px; line-height: 20px; padding: 0 4px; border-radius: 3px; text-align: center;
	font-size: 11px; font-weight: 700; background: #c8c8c8; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.arc-pd-poolbtn.is-ban { background: #964b00; color: #000; }
.arc-pd-poolbtn.is-current { outline: 2px solid #15156c; outline-offset: -2px; }

/* profile popup */
.arc-pd-preview .arc-pd-pop-toggle { margin-top: 8px; display: none; }
.arc-pd-pop {
	max-width: 330px; margin: 10px auto 0; border-radius: 5px; overflow: hidden; color: #000;
	background: rgba(245,245,247,0.96); box-shadow: 0 0 5px rgba(0,0,0,0.4); font-family: Helvetica, Arial, sans-serif;
}
.arc-pd-pop-title {
	height: 30px; line-height: 30px; padding: 0 10px; font-weight: 700; font-size: 14px; color: #fff;
	background: #1e5b2f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
.arc-pd-pop-band {
	position: relative; display: flex; align-items: center; gap: 10px; padding: 10px;
	min-height: 87px; background-color: #3a3f4b; background-size: cover; background-position: center; overflow: hidden;
}
.arc-pd-pop-band > .arc-pd-av { background-color: rgba(255,255,255,0.15); position: relative; z-index: 2; }
.arc-pd-pop-band > .arc-pd-av.is-empty { outline-color: rgba(255,255,255,0.4); }
.arc-pd-pop-info { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; flex: 1; background: transparent !important; }
.arc-pd-chip.arc-pd-pop-name { font-size: 15px; line-height: 20px; font-weight: 700; }
.arc-pd-chip {
	display: inline-block; max-width: 100%; padding: 1px 7px; border-radius: 10px; font-size: 12px; line-height: 16px;
	background: rgba(255,255,255,0.55); color: #000; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.arc-pd-chip .arc-pd-status { font-size: 12px; line-height: 16px; color: inherit; white-space: nowrap; }
.arc-pd-pop-home { font-size: 11px; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-pd-pop-icons { display: flex; gap: 4px; }
.arc-pd-pop-icons svg { width: 12px; height: 12px; }
.arc-pd-pop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.arc-pd-pop-btn {
	position: relative; overflow: hidden; display: block; height: 30px; line-height: 30px; text-align: center; border-radius: 4px;
	font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(#5bb85b, #3d8b3d); white-space: nowrap; text-overflow: ellipsis;
}
.arc-pd-pop-btn > .arct-pstyle-overlay { z-index: 0; }

/* phones: a compact preview pinned under the top bar (the bot's chat row and list entry; the popup on demand) */
@media (max-width: 767.98px) {
	.arc-pd-preview { position: sticky; top: 64px; z-index: 20; padding: 6px; background: #1b2026; box-shadow: 0 4px 14px rgba(0,0,0,0.45); }
	.arc-pd-pv-bar { margin-bottom: 4px; }
	.arc-pd-xat { grid-template-columns: minmax(0, 1fr) 104px; padding: 4px; gap: 4px; }
	.arc-pd-msg:not([data-pd-bot]), .arc-pd-user + .arc-pd-user, .arc-pd-pools, .arc-pd-pv-note { display: none; }
	.arc-pd-msg { margin-bottom: 0; }
	.arc-pd-preview .arc-pd-pop-toggle { display: block; }
	.arc-pd-pop { max-height: 45vh; overflow-y: auto; }
	.arc-pd-sec-body { padding: 12px 10px; }
}

/* after a save */
.arc-pd-saved { margin: -6px 0 14px; }
.arc-pd-saved-moved { color: #ffc107; }
.arc-fs-undo svg { width: 13px; height: 13px; vertical-align: -2px; }

/* the name renderer's glow clone and status effects sized to the xat rows (arctools.css sizes them for the tools) */
.arc-pd-name .arct-preview-glow-clone {
	font-size: inherit; font-weight: inherit; line-height: inherit; text-align: left; white-space: nowrap; word-break: normal;
}
.arc-pd-panel, .arc-pd-user-text, .arc-pd-msg-body, .arc-pd-chip { overflow: hidden; }

/* ---------- the xat HTML5 client's desktop ("classic") look (ARCbots_trainingdata ixat/zatsite/web/www: classic.html,
   visitors.js, actions.js, xat.css; measurements only): 15px base font in the Helvetica Neue stack; chat and visitor
   panels translucent white (.3) with a light grey border and 8px corners over the room background; visitor name
   weight 500 with the status line under it at .857em in #222; pools as rows in the visitor list (20px group icon,
   .9em, .4em corners, a white-to-black sheen over the pool colour) that move you to that pool; profile title
   "regname (id)" bold white on the title bar with 8px top corners; avatar up to 160px (half the dialog) with 6px
   padding; name as a heading, status / online line / homepage at .8em; buttons 2 per row, bold, .4em corners and
   the same sheen over the room's button colour. ---------- */
.arc-pd-xat {
	grid-template-columns: minmax(0, 1fr) 118px;
	background: linear-gradient(170deg, #b9d3ee 0%, #d9e6f4 55%, #eef3f9 100%);
	font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px;
}
.arc-pd-chat, .arc-pd-panel { background: rgba(255,255,255,0.3); border: 1px solid rgba(192,192,192,0.8); border-radius: 8px; }
.arc-pd-msg { font-size: 15px; line-height: 18px; }
.arc-pd-panel { font-size: 15px; line-height: 18px; }
.arc-pd-room { display: flex; flex-direction: column; font-size: 14px; }
.arc-pd-poolname { font-weight: 500; font-size: .8em; color: #222; overflow: hidden; text-overflow: ellipsis; }
.arc-pd-user .arc-pd-name { font-weight: 500; }
.arc-pd-user .arc-pd-status { font-size: .857em; font-weight: 400; color: #222; line-height: 1.2; }
.arc-pd-user .arc-pd-status-wrap { height: 1.3em; line-height: 1.3em; flex-shrink: 0; }
.arc-pd-user .arc-pd-status-wrap > .arc-pd-status, .arc-pd-user .arc-pd-status-wrap > .arct-sfx-caret { vertical-align: top; }
.arc-pd-user .arc-pd-name { height: 1.3em; line-height: 1.3em; white-space: nowrap; flex-shrink: 0; }
.arc-pd-pools { gap: 0; }
.arc-pd-poolrow {
	display: flex; align-items: center; gap: 4px; width: calc(100% - .27em); margin: .27em .13em; padding: 2px 4px;
	border: 0; border-radius: .4em; cursor: pointer; text-align: left; font: inherit; font-size: .9em; font-weight: 500; color: #000;
	background-color: #c8c8c8; background-image: linear-gradient(rgba(255,255,255,0.3), rgba(0,0,0,0.3));
}
.arc-pd-poolrow:hover .arc-pd-poolrow-name { color: grey; }
.arc-pd-poolrow:focus-visible { outline: 2px solid #15156c; outline-offset: 1px; }
.arc-pd-poolrow.is-ban { background-color: #964b00; }
.arc-pd-poolrow-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-pd-poolicon {   /* our own small "group" glyph in the 20px slot */
	width: 20px; height: 20px; flex-shrink: 0;
	background: no-repeat center/16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6'/%3E%3Ccircle cx='17' cy='9' r='2.6'/%3E%3Cpath d='M16 14.2c3 .2 5.5 2.3 5.5 5.3'/%3E%3C/svg%3E");
}
.arc-pd-pop { border-radius: 8px; background: #f9f9f9; }
.arc-pd-pop-title { height: auto; line-height: 1.3; padding: 8px 14px; border-radius: 8px 8px 0 0; font-size: 15px; }
.arc-pd-av-big { width: 120px; height: 120px; flex: 0 0 120px; }   /* xat: up to 160px and at most half the dialog, square */
.arc-pd-pop-band { align-items: flex-start; padding: 10px; }
.arc-pd-chip.arc-pd-pop-name { font-size: 1.17em; }
.arc-pd-pop .arc-pd-chip { font-size: .8em; }
.arc-pd-pop .arc-pd-chip .arc-pd-status { font-size: 1em; }
.arc-pd-pop-home { font-size: .8em; }
.arc-pd-pop-btn {
	border-radius: .4em; font-size: 13px;
	box-shadow: inset 0 14px 10px -8px rgba(255,255,255,0.3), inset 0 -14px 10px -8px rgba(0,0,0,0.3);
}

/* animated avatars: a horizontal strip shows one square frame at a time (profile-designer.js steps it at 12 fps) */
.arc-pd-av.is-strip { background-repeat: no-repeat; }
@media (max-width: 767.98px) {
	.arc-pd-xat { grid-template-columns: minmax(0, 1fr) 108px; font-size: 14px; }
	.arc-pd-av-big { width: 96px; height: 96px; flex-basis: 96px; }
}

/* pawns (xat-pawn.js): the 19-unit pawn stage sits in a 13x19 slot; hats overflow it like xat's do */
.arc-pd-pawn { position: relative; display: inline-block; width: 13px; height: 19px; flex-shrink: 0; vertical-align: middle; }
.arc-pd-pawn > svg { position: absolute; left: -4px; top: -7px; pointer-events: none; }
.arc-pd-pawn-big { width: 52px; height: 76px; margin: 28px 16px 4px 16px; }
.arc-pd-pawn-big > svg { left: -16px; top: -28px; }
.arc-pd-hatpreview { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 6px 10px; border-radius: 8px;
	background: linear-gradient(170deg, #b9d3ee 0%, #eef3f9 100%); }
.arc-pd-hatpreview small { color: #333 !important; }
.arc-pd-pv-controls { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.arc-pd-pv-hue { width: 28px; height: 28px; }
