/* 임시 */

body:has(> .selma_app_wrap) { height:100vh; height:100dvh; min-height:0; overflow:hidden; }
body:has(> .selma_app_wrap) > .selma_app_wrap { height:100%; }

main#admin { height:100vh; height:100dvh; min-height:0; padding:0; overflow:auto; box-sizing:border-box; }
main#admin > .content { height:100%; min-height:0; margin:0; overflow:auto; padding:60px 0; background:#f2f2f2; display:flex; flex-direction:column; }

main#sub02:has(.selma_app_wrap) > .container { display:flex; flex-direction:column; }
main#sub02 .selma_app_wrap { max-height:650px; height:auto; }
main#sub02 .jw-page-head { margin-bottom:20px; }

.selma_app_wrap { width:100%; max-height:100%; min-height:0; display:flex; justify-content:center; align-items:center; gap:40px; }
.selma_app_wrap > .info { display:flex; flex-direction:column; width:400px; max-width:calc(100% - 420px); height:100%; max-height:660px; padding:32px 0; gap:40px; }
.selma_app_wrap > .info p { margin:0; color:#8193ab; line-height:1.8; }
.selma_app_wrap > .info p:first-child { color:#7295c7; font-size:12px; letter-spacing:2px; }
.selma_app_wrap > .info h1 { margin:12px 0; color:#25364b; font-size:24px; font-weight:600; line-height:1.6; word-break:keep-all; }
.selma_app_wrap > .info h1 em { color:#4b74ff; font-style:normal; }
.selma_app_wrap > .info img { display:block; flex-shrink:1; width:100%; height:auto; min-height:0; max-height:360px; margin-top:32px; object-fit:contain; }
@media (max-width:1024px) {
	.selma_app_wrap { height:100vh; height:100dvh; }
	main#sub02 .selma_app_wrap { height:auto; }
	.selma_app_wrap > .info { display:none; }
}

.jw-button.ghost { box-shadow: none; }

/* selma_app */
#selma_app { position:relative; width:100%; max-width:380px; height:100%; min-height:0; padding-bottom:env(safe-area-inset-bottom); display:flex; flex-direction:column; box-sizing:border-box; background:#fff; border:1px solid #ccc; overflow:hidden; }
#selma_app button { -webkit-tap-highlight-color:transparent; }
#selma_app > main { min-height:0; flex:1; display:block; overflow:auto; padding:10px; }
.p-chat-messages { width:100%; display:flex; flex-direction:column; gap:12px; padding:16px 12px; }
.p-chat-message-user { white-space:pre-wrap; max-width:85%; align-self:flex-end; margin:0; padding:10px 12px; color:#fff; background:#4b74ff; border-radius:16px 16px 4px 16px; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.p-chat-message-assistant { max-width:85%; align-self:flex-start; margin:0; padding:10px 12px; color:#25364b; background:#f1f3f7; border-radius:16px 16px 16px 4px; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.p-chat-message-assistant.is-loading { position:relative; overflow:hidden; }
.p-chat-message-assistant.is-loading::after { position:absolute; inset:0; background:linear-gradient(110deg, transparent 25%, rgba(255,255,255,.7) 50%, transparent 75%); transform:translateX(-100%); animation:selma-chat-shine 1.8s ease-in-out infinite; pointer-events:none; content:""; }
@keyframes selma-chat-shine { 100% { transform:translateX(100%); } }
@media (prefers-reduced-motion:reduce) {
	.p-chat-message-assistant.is-loading::after { animation:none; }
}
#selma_app > header { height:60px; padding:0 18px; display:flex; align-items:center; justify-content:space-between; background:#eef2ff; border-bottom:1px solid #edf0f5; }
#selma_app > header .logo { display:flex; align-items:center; gap:10px; color:#25364b; }
#selma_app > header .logo svg { display:block; width:24px; height:24px; color:#4b74ff; }
#selma_app > header .logo strong { font-size:20px; font-weight:700; letter-spacing:3px; }
#selma_app > header > .ghost { width:40px; height:40px; border-radius:50%; }
#selma_app > header .ic-hamberg { --s:22px; --color:#25364b; }

/* 단축버튼 */
.quick-button { min-height:48px; flex:0 0 48px; display:flex; align-items:center; gap:6px; padding:0 12px; border-top:1px solid #edf0f5; }
.quick-button #quick-prompt-buttons { min-width:0; flex:1; display:flex; align-items:center; gap:6px; overflow-x:auto; margin:0; padding:0; list-style:none; }
.quick-button #quick-prompt-buttons { scrollbar-width:none; -ms-overflow-style:none; }
.quick-button #quick-prompt-buttons::-webkit-scrollbar { display:none; width:0; height:0; }

.quick-button #quick-prompt-buttons > li { flex:0 0 auto; }
.quick-button #quick-prompt-buttons > li > button { max-width:140px; height:32px; padding:0 10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.quick-button #selma-mcp-toggle { font-size:12px; border-radius:16px; }
.quick-button #selma-mcp-toggle .material-symbols-outlined { font-size:16px; }
.quick-button .ghost { width:40px; height:40px; border-radius:50%; }

/* 채팅입력폼 */
#selma-chat-form { flex-shrink:0; display:flex; align-items:center; gap:6px; margin:8px 12px 12px; padding:6px 8px; background:#fff; border:1px solid #dce2ec; border-radius:28px; box-shadow:none; }
#selma-chat-form:focus-within { border-color:#9bb4ff; }
#selma-chat-form > .jw-button { width:36px; height:36px; flex:0 0 36px; display:flex; align-items:center; justify-content:center; padding:0; color:#52647a; background:transparent; border:0; border-radius:50%; box-shadow:none; cursor:pointer; }
#selma-chat-form > .jw-button:hover { color:#315fe8; background:#f2f5ff; }
#selma-chat-form > #selma-chat-input { min-width:0; min-height:36px; max-height:72px; flex:1; box-sizing:border-box; overflow-y:auto; padding:9px 4px; color:#25364b; background:transparent; outline:0; overflow-wrap:anywhere; white-space:pre-wrap; }
#selma-chat-form > #selma-chat-input:empty::before { color:#8794a8; content:attr(data-placeholder); pointer-events:none; }
#selma-chat-form > #selma-send-message { color:#fff; background:#4b74ff; }
#selma-chat-form > #selma-send-message:hover { color:#fff; background:#315fe8; }
#selma-chat-form .material-symbols-outlined { font-size:20px; }

/* 옵션 */
#modal_options { position:absolute; z-index:10; inset:0; height:100%; box-sizing:border-box; background:#fff; display:flex; flex-direction:column; overflow:hidden; transform:translateX(-100%); transition:transform .25s ease; }
#modal_options.is-action { transform:translateX(0); }
#modal_options header { height:60px; flex:0 0 60px; padding:0 18px; display:flex; align-items:center; background:#fff; border-bottom:1px solid #edf0f5; }
#modal_options header .ghost { --jwbutton-bghover:transparent; }
#modal_options header .material-symbols-outlined { font-size:18px; }
#modal_options .form { min-height:0; flex:1; display:flex; flex-direction:column; gap:14px; padding:16px; overflow-y:auto; }
#modal_options footer { flex:0 0 auto; padding:12px 16px; background:#fff; border-top:1px solid #edf0f5; }
#modal_options .form .field { display:grid; gap:8px; }
#modal_options .form .field > label { color:#34445b; font-size:13px; font-weight:600; }
#modal_options .form .field > input,
#modal_options .form .field > select,
#modal_options .form .field > textarea,
#modal_options .form .field > div > input { width:100%; min-width:0; box-sizing:border-box; padding:0 10px; color:#25364b; background:#fff; border:1px solid #dce2ec; border-radius:6px; font:inherit; }
#modal_options .form .field > input,
#modal_options .form .field > select,
#modal_options .form .field > div > input { height:38px; }
#modal_options .form .field > textarea { min-height:96px; padding:10px; resize:vertical; }
#modal_options .form .field > div { display:flex; align-items:center; gap:8px; }
#modal_options .form .field > div > input { flex:1; }
#modal_options #options-data-folder[readonly] { color:#52647a; background:#f4f6fa; border-color:#e1e6ef; cursor:default; }
#modal_options .form .field input:focus,
#modal_options .form .field select:focus,
#modal_options .form .field textarea:focus { border-color:#9bb4ff; outline:0; }
#modal_options .form .field p { margin:0; color:#8794a8; font-size:12px; line-height:1.5; }
#modal_options .options-login { padding-bottom:14px; border-bottom:1px solid #edf0f5; }
#modal_options .options-login > strong { color:#34445b; font-size:13px; font-weight:600; }
#modal_options .options-login > div { justify-content:space-between; }
#modal_options .options-login .options-login-status { color:#c44545; }

/* 도구 */
#selma-tools-panel { position:absolute; z-index:10; inset:0; height:100%; box-sizing:border-box; background:#fff; overflow:auto; transform:translateX(-100%); transition:transform .25s ease; }
#selma-tools-panel.is-action { transform:translateX(0); }
#selma-tools-panel header { height:60px; padding:0 18px; display:flex; align-items:center; background:#fff; }
#selma-tools-panel header .ghost { --jwbutton-bghover:transparent; }
#selma-tools-panel header .material-symbols-outlined { font-size:18px; }
#selma-tools-panel .content-wrap { padding:10px; }

#selma-tools-panel .search-wrap { margin:12px 0; }
#selma-tools-panel .search-wrap > label { height:38px; display:flex; align-items:center; gap:8px; padding:0 10px; color:#8491a4; border:1px solid #dce2ec; border-radius:8px; }
#selma-tools-panel .search-wrap > label:focus-within { border-color:#9bb4ff; }
#selma-tools-panel .search-wrap input { width:100%; min-width:0; padding:0; color:#25364b; background:transparent; border:0; outline:0; font:inherit; }
#selma-tools-panel .search-wrap input::placeholder { color:#8794a8; }
#selma-tools-panel .search-wrap .material-symbols-outlined { font-size:18px; }
#selma-tools-list { margin:8px 0 0; padding:0; list-style:none; border-top:1px solid #edf0f5; }
#selma-tools-list > li { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 10px; color:#34445b; font-size:14px; }
#selma-tools-list > li:hover { background:#f8faff; }
#selma-tools-list .jw-switch { margin:0; }


/* 퀵 프롬프트 관리 모달 */
dialog:has(.p-quick-prompts-modal) { width:100%; max-width:380px; max-height:450px; }
.p-quick-prompts-modal { width:100%; max-height:450px; box-sizing:border-box; display:flex; flex-direction:column; min-height:0; padding:20px; color:#25364b; background:#fff; }
.p-quick-prompts-modal header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:14px; }
.p-quick-prompts-modal h2 { margin:0; font-size:18px; font-weight:600; }
.p-quick-prompts-modal #quick-prompt-list { width:100%; max-height:250px; min-height:0; flex:0 1 auto; overflow-y:auto; margin:0; padding:0; list-style:none; }
.p-quick-prompts-modal #quick-prompt-list > li { height:40px; display:flex; align-items:center; gap:8px; padding:0 10px; }
.p-quick-prompts-modal #quick-prompt-list .p-quick-prompt-handle { width:6px; height:6px; flex:0 0 6px; border-radius:50%; background:#000; cursor:grab; }
.p-quick-prompts-modal #quick-prompt-list > li:hover { background:#f8faff; }
.p-quick-prompts-modal #quick-prompt-list .p-quick-prompt-title { min-width:0; flex:1; overflow:hidden; color:#34445b; text-overflow:ellipsis; white-space:nowrap; }
.p-quick-prompts-modal #quick-prompt-status { padding:12px 0; color:#8794a8; font-size:12px; }
.p-quick-prompts-modal footer { display:flex; justify-content:flex-end; padding-top:12px; }

/* 퀵 프롬프트 입력 모달 */
dialog:has(.p-quick-prompt-form) { width:100%; max-width:380px; }
.p-quick-prompt-form { width:100%; box-sizing:border-box; display:flex; flex-direction:column; gap:10px; padding:20px; color:#25364b; background:#fff; }
.p-quick-prompt-form header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:14px; }
.p-quick-prompt-form h2 { margin:0; font-size:18px; font-weight:600; }
.p-quick-prompt-form > label { margin-top:4px; color:#34445b; font-size:13px; font-weight:600; }
.p-quick-prompt-form > input,
.p-quick-prompt-form > textarea { width:100%; min-width:0; box-sizing:border-box; padding:10px; color:#25364b; background:#fff; border:1px solid #dce2ec; border-radius:6px; font:inherit; }
.p-quick-prompt-form > input { width:100%; height:40px; }
.p-quick-prompt-form > textarea { min-height:120px; resize:vertical; line-height:1.6; }
.p-quick-prompt-form > input:focus,
.p-quick-prompt-form > textarea:focus { border-color:#9bb4ff; outline:0; }
.p-quick-prompt-form #quick-prompt-form-status { min-height:18px; color:#8794a8; font-size:12px; }
.p-quick-prompt-form footer { display:flex; justify-content:flex-end; padding-top:12px; }




/* 음성 버튼 활성 파동 */
#selma-chat-form [data-voice-toggle] { position:relative; z-index:0; overflow:visible; }
#selma-chat-form [data-voice-toggle]::before,
#selma-chat-form [data-voice-toggle]::after { position:absolute; z-index:-1; inset:0; border-radius:50%; background:rgba(220,38,38,.25); opacity:0; content:""; }
#selma-chat-form [data-voice-toggle].is-active { color:#dc2626; background:#fee2e2; }
#selma-chat-form [data-voice-toggle].is-active::before { animation:selma-voice-wave 1.8s ease-out infinite; }
#selma-chat-form [data-voice-toggle].is-active::after { animation:selma-voice-wave 1.8s ease-out .9s infinite; }
@keyframes selma-voice-wave { 0% { transform:scale(1); opacity:.55; } 100% { transform:scale(2.1); opacity:0; } }


/* 샘플 */
.p-chat-messages:has(> article) { gap:24px; padding:14px 4px 24px; color:#25364b; line-height:1.7; overflow-wrap:anywhere; }
.p-chat-messages > p:first-child:not([class]) { display:flex; align-items:center; gap:12px; margin:0 0 2px; color:#687589; font-size:12px; text-align:center; }
.p-chat-messages > p:first-child:not([class])::before, .p-chat-messages > p:first-child:not([class])::after { content:""; flex:1; height:1px; background:#e5e9ef; }
.p-chat-messages > div:not([class]) { align-self:flex-end; max-width:90%; text-align:right; }
.p-chat-messages > div:not([class]) > p { margin:0; padding:11px 14px; color:#fff; background:#315fe8; border-radius:14px 14px 4px 14px; text-align:left; }
.p-chat-messages > div:not([class]) > time { display:block; margin-top:5px; color:#687589; font-size:12px; }
.p-chat-messages > article { min-width:0; display:flex; flex-direction:column; gap:14px; }
.p-chat-messages > article > h2 { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0; color:#1d2d43; font-size:16px; font-weight:700; }
.p-chat-messages > article > h2 > .material-symbols-outlined { color:#315fe8; font-size:22px; }
.p-chat-messages > article > h2 > small { margin-left:auto; color:#687589; font-size:12px; font-weight:400; }
.p-chat-messages > article > p { margin:0; color:#40516a; }
.p-chat-messages > article > section { min-width:0; overflow:hidden; border:1px solid #dce3ed; border-radius:10px; background:var(--bg-color); }
.p-chat-messages > article > section > header { display:flex; align-items:center; flex-wrap:wrap; gap:7px; padding:12px; border-bottom:1px solid #e8edf3; }
.p-chat-messages > article > section > header > .material-symbols-outlined { color:#315fe8; font-size:20px; }
.p-chat-messages > article > section > header > strong { font-weight:700; }
.p-chat-messages > article > section > header > small { margin-left:auto; color:#687589; font-size:12px; }
.p-chat-messages > article > section > div { padding:14px 12px; }
.p-chat-messages > article > section > div > p { margin:0; }
.p-chat-messages > article > section > div > p > em { color:#234ec4; font-weight:700; font-style:normal; }
.p-chat-messages > article > section dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:16px 0; padding:12px 0; background:#f5f7fb; border-radius:6px; text-align:center; }
.p-chat-messages > article > section dl > div + div { border-left:1px solid #dde4ef; }
.p-chat-messages > article > section dt { color:#40516a; font-size:inherit; }
.p-chat-messages > article > section dd { margin:4px 0 0; color:#234ec4; font-size:24px; font-weight:700; line-height:1.3; font-variant-numeric:tabular-nums; }
.p-chat-messages > article > section dd > small { margin-left:3px; color:#687589; font-size:12px; font-weight:400; }
.p-chat-messages > article > section dl + p { color:#526178; }
.p-chat-messages > article > section > div > div { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; padding-bottom:14px; border-bottom:1px solid #e8edf3; text-align:center; }
.p-chat-messages > article > section > div > div > div { display:flex; flex-direction:column; align-items:center; gap:6px; }
.p-chat-messages > article > section > div > div small { color:#687589; font-size:12px; }
.p-chat-messages > article > section > div > div span { display:grid; place-items:center; width:30px; height:30px; font-weight:600; font-variant-numeric:tabular-nums; }
.p-chat-messages > article > section ul { display:flex; flex-direction:column; gap:16px; margin:16px 0 0; padding:0; list-style:none; }
.p-chat-messages > article > section ul > li { display:flex; align-items:baseline; gap:12px; }
.p-chat-messages > article > section ul time { flex-shrink:0; color:#234ec4; font-weight:600; font-variant-numeric:tabular-nums; }
.p-chat-messages > article > section li > div { flex:1; min-width:0; }
.p-chat-messages > article > section li strong { font-weight:600; }
.p-chat-messages > article > section li p { margin:3px 0 0; color:#687589; font-size:12px; line-height:1.6; }
.p-chat-messages > article > section > footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; color:#234ec4; border-top:1px solid #e8edf3; }
.p-chat-messages > article > section > footer > .material-symbols-outlined { font-size:18px; }
.p-chat-messages > article > section > ol { margin:0; padding:0 12px; list-style:none; }
.p-chat-messages > article > section > ol > li { display:flex; align-items:center; gap:10px; padding:14px 0; }
.p-chat-messages > article > section > ol > li + li { border-top:1px solid #e8edf3; }
.p-chat-messages > article > section > ol > li > span:first-child { flex-shrink:0; color:#315fe8; font-weight:700; font-variant-numeric:tabular-nums; }
.p-chat-messages > article > section > ol > li > .material-symbols-outlined { color:#687589; font-size:18px; }
.p-chat-messages > article > div { display:flex; align-items:center; gap:14px; color:#687589; }
.p-chat-messages > article > div > .material-symbols-outlined { font-size:18px; }
.p-chat-messages > article > div > time { margin-left:auto; font-size:12px; }








