/* [Senior Restoration] Legacy Editor Style Porting */
/* 레이아웃 복원 */
.editor-wrapper {
    display: flex;
    user-select: none;
    height: calc(100vh - 150px); /* 헤더/푸터 고려하여 높이 조정 */
    gap: 10px;
}

#left, #center, #right {
    border: 1px solid #ccc;
    box-sizing: border-box;
    padding: 10px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #fff; /* CI4 배경색과 구분 */
    border-radius: 8px; /* 모던함 한 스푼 */
}

/* 1:2:1 비율 적용 */
#left, #right {
    flex: 1 1 0;
    min-width: 200px;
    max-width: 600px;
}
#center {
    flex: 2 1 0;
    background: #f0f0f0;
    position: relative;
    align-items: center; /* 캔버스 중앙 정렬 */
}

#canvas {
    position: relative;
    background: white;
    border: 1px solid #999;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 시각적 개선 */
}

.editor-component {
    position: absolute;
    border: 1px dashed #333;
    padding: 4px;
    cursor: move;
    resize: both;
    overflow: auto;
    background: white;
    box-sizing: border-box;
}

.selected {
    border: 2px solid blue !important;
    z-index: 9999;
}

#preview {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border: 1px solid #ddd;
    flex-grow: 1;
    overflow: hidden;
    user-select: none;
}

.preview-component {
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    position: absolute;
    overflow: hidden;
}

#log {
    height: 100px;
    border-top: 1px solid #ccc;
    margin-top: 5px;
    font-size: 12px;
    background: #fafafa;
    overflow-y: auto;
    padding: 5px;
    box-sizing: border-box;
}

label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
    font-size: 0.9rem;
}

input, select, button {
    margin-top: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 5px; /* 입력 편의성 개선 */
}

button {
    cursor: pointer;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 0;
}

button:hover {
    background-color: #d0d0d0;
}

#deleteBtn {
    background: #f44336;
    color: #fff;
    border: none;
}

#deleteBtn:hover {
    background: #d32f2f;
}

/* 카드 UI 스타일 (CI4 테마 통합) */
.card-ui {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
    margin-bottom: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.full-width {
    width: 100%;
}

.button-group {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.button-group button {
    flex: 1;
}
