/* 데모 화면 껍데기. 편집기 모듈 자체와는 무관하다. */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Malgun Gothic", "맑은 고딕", -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #22272e;
    background: #f2f4f6;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 48px;
    background: #2c3038;
    color: #fff;
    flex: 0 0 auto;
}

.app-header h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.app-header .file-name {
    font-size: 12px;
    color: #a9b1bd;
}

.app-header .spacer {
    flex: 1;
}

.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel-left,
.panel-right {
    flex: 0 0 250px;
    background: #fff;
    overflow-y: auto;
}

.panel-left {
    border-right: 1px solid #dde1e6;
}

.panel-right {
    border-left: 1px solid #dde1e6;
}

.panel-center {
    flex: 1;
    min-width: 0;
}

.panel-section {
    padding: 12px;
    border-bottom: 1px solid #eceff2;
}

.panel-section > h2 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: #55606e;
    letter-spacing: .02em;
}

.hint {
    margin: 8px 0 0;
    font-size: 11px;
    color: #8a939f;
    line-height: 1.5;
}

/* ------------------------------------------------------------- 컨트롤 */

button {
    font: inherit;
    cursor: pointer;
    border: 1px solid #c6ccd4;
    background: #fff;
    border-radius: 4px;
    padding: 5px 10px;
    color: #2c3038;
}

button:hover:not(:disabled) {
    background: #f0f3f6;
}

button:disabled {
    opacity: .45;
    cursor: default;
}

button.primary {
    background: #2f6fd0;
    border-color: #2f6fd0;
    color: #fff;
}

button.primary:hover:not(:disabled) {
    background: #2a63ba;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #dde1e6;
    flex: 0 0 auto;
}

.toolbar .spacer {
    flex: 1;
}

/* ------------------------------------------------------------- 참여자 */

.signer {
    border: 1px solid #e3e7ec;
    border-radius: 5px;
    padding: 8px;
    margin-bottom: 8px;
}

.signer-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.signer-chip {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, .18);
}

.signer-name {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signer-remove {
    border: none;
    background: none;
    color: #98a1ad;
    padding: 0 3px;
    font-size: 14px;
}

.signer-remove:hover {
    color: #d64545;
    background: none;
}

.item-buttons {
    display: flex;
    gap: 5px;
}

.item-buttons button {
    flex: 1;
    padding: 4px 0;
    font-size: 12px;
}

/* --------------------------------------------------------------- 문서 */

.doc {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border: 1px solid #e3e7ec;
    border-radius: 5px;
    margin-bottom: 6px;
    cursor: pointer;
}

.doc:hover {
    background: #f5f8fb;
}

.doc.active {
    border-color: #2f6fd0;
    background: #eef4fd;
}

.doc-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-badge {
    font-size: 10px;
    color: #1f7a44;
    background: #e3f5ea;
    border-radius: 3px;
    padding: 1px 5px;
    flex: 0 0 auto;
}

.doc-remove {
    border: none;
    background: none;
    color: #98a1ad;
    padding: 0 3px;
    font-size: 14px;
}

.doc-remove:hover {
    color: #d64545;
    background: none;
}

.empty-row {
    color: #98a1ad;
    font-size: 12px;
    padding: 6px 2px;
}

/* --------------------------------------------------------- 좌표 미리보기 */

.positions {
    display: none;
    flex: 0 0 auto;
    max-height: 190px;
    overflow: auto;
    background: #1e2229;
    color: #cfd6de;
    font-family: Consolas, "D2Coding", monospace;
    font-size: 11px;
    line-height: 1.5;
    padding: 10px 12px;
    margin: 0;
    white-space: pre;
    border-top: 1px solid #11141a;
}

.positions.show {
    display: block;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    background: #22272e;
    color: #fff;
    padding: 9px 18px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
    z-index: 10000;
}

.toast.show {
    opacity: .95;
}
