/* ==========================================
   Common Styles - 공통 스타일
   PC와 모바일 모두에서 사용되는 기본 스타일
   ========================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui, var(--font-sans, 'Inter', system-ui, sans-serif));
    background-color: var(--background);
    color: var(--foreground);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Canvas 공통 스타일 */
#imageCanvas {
    border: 1px solid var(--border);
    cursor: crosshair;
    border-radius: var(--radius);
    box-shadow: var(--shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    height: auto !important;
}

.canvas-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--muted);
    border-radius: var(--radius);
    position: relative;
}

.canvas-container.empty {
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #e0e0e0 0% 50%) 50% / 60px 60px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 제목과 아이콘, 셀렉트를 좌측 정렬 */
    gap: 0.5rem;
}

.panel-title-left {
    display: flex;
    align-items: center;
    gap: 0.4rem; /* 아이콘-텍스트 간격 조금 축소 */
}

.panel-inline-control {
    flex-shrink: 0;
    min-width: 120px;
}

.panel-inline-control select {
    width: auto;
    min-width: 120px;
    font-size: 0.8rem;
    padding-right: 1.75rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--muted-foreground);
    text-align: center;
}

.empty-state .material-icons {
    font-size: 4rem;
    opacity: 0.5;
}

/* 버튼 공통 스타일 */
button {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* 입력 요소 공통 스타일 */
input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
}

select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 12px;
}

.dark select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

select:focus, input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: var(--focus-ring, 0 0 0 2px rgba(59, 130, 246, 0.1));
}

/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
