/* 이미지 편집기 전용 CSS */

/* 메인 컨테이너 */
.image-editor-container {
    background-color: rgb(15, 23, 42);
    /* dashboard-bg */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    overflow: hidden;
}

/* 헤더 */
.image-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    /* px-6 py-4 */
    border-bottom: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: rgb(30, 41, 59);
    /* panel-bg */
}

.image-editor-title-group {
    flex: 1;
}

.image-editor-title {
    font-size: 1.25rem;
    /* text-xl */
    font-weight: 700;
    color: rgb(241, 245, 249);
    /* slate-100 */
}

.image-editor-close {
    width: 2.5rem;
    /* w-10 */
    height: 2.5rem;
    /* h-10 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    /* rounded-lg */
    background: none;
    border: none;
    color: rgb(148, 163, 184);
    /* slate-400 */
    cursor: pointer;
    transition: all 150ms;
}

.image-editor-close:hover {
    background-color: rgb(51, 65, 85);
    /* slate-700 */
    color: rgb(241, 245, 249);
    /* slate-100 */
}

/* 바디 */
.image-editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 툴바 */
.image-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    /* px-6 py-4 */
    border-bottom: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: rgb(30, 41, 59);
    /* panel-bg */
    gap: 1rem;
    /* gap-4 */
}

.image-editor-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
}

.image-editor-toolbar-right {
    display: flex;
    align-items: center;
}

.image-editor-file-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    padding: 0.5rem 1rem;
    /* px-4 py-2 */
    background-color: #3b82f6;
    /* primary */
    color: white;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    border-radius: 0.375rem;
    /* rounded-md */
    cursor: pointer;
    transition: all 150ms;
    border: none;
}

.image-editor-file-button:hover {
    background-color: #2563eb;
    /* primary-600 */
}

.image-editor-file-button .material-symbols-outlined {
    font-size: 1.25rem;
    /* text-xl */
}

.image-editor-divider {
    width: 1px;
    height: 2rem;
    /* h-8 */
    background-color: rgb(51, 65, 85);
    /* panel-border */
    margin: 0 0.5rem;
    /* mx-2 */
}

.image-editor-tool-button {
    width: 2.5rem;
    /* w-10 */
    height: 2.5rem;
    /* h-10 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    /* rounded-md */
    background-color: transparent;
    border: 1px solid rgb(51, 65, 85);
    /* panel-border */
    color: rgb(226, 232, 240);
    /* slate-200 */
    cursor: pointer;
    transition: all 150ms;
}

.image-editor-tool-button:hover {
    background-color: rgb(51, 65, 85);
    /* slate-700 */
}

.image-editor-tool-button .material-symbols-outlined {
    font-size: 1.25rem;
    /* text-xl */
}

.image-editor-zoom-info {
    padding: 0 0.75rem;
    /* px-3 */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    color: rgb(148, 163, 184);
    /* slate-400 */
    min-width: 4rem;
    /* min-w-16 */
    text-align: center;
}

.image-editor-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    font-size: 0.875rem;
    /* text-sm */
    color: rgb(226, 232, 240);
    /* slate-200 */
    cursor: pointer;
    user-select: none;
}

.image-editor-checkbox {
    width: 1.25rem;
    /* w-5 */
    height: 1.25rem;
    /* h-5 */
    border-radius: 0.25rem;
    /* rounded */
    border: 1px solid rgb(51, 65, 85);
    /* panel-border */
    cursor: pointer;
    accent-color: #3b82f6;
    /* primary */
}

/* 캔버스 컨테이너 */
.image-editor-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(15, 23, 42);
    /* dashboard-bg */
    background-image: 
        linear-gradient(45deg, rgb(30, 41, 59) 25%, transparent 25%),
        linear-gradient(-45deg, rgb(30, 41, 59) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgb(30, 41, 59) 75%),
        linear-gradient(-45deg, transparent 75%, rgb(30, 41, 59) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    overflow: hidden;
    position: relative;
}

.image-editor-canvas {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transition: transform 100ms;
    cursor: grab;
}

.image-editor-canvas:active {
    cursor: grabbing;
}

.image-editor-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    user-select: none;
    pointer-events: none;
}

.image-editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    /* p-16 */
    color: rgb(100, 116, 139);
    /* slate-500 */
}

.image-editor-placeholder .material-symbols-outlined {
    font-size: 4rem;
    /* text-6xl */
    margin-bottom: 1rem;
    /* mb-4 */
}

.image-editor-placeholder p {
    font-size: 1rem;
    /* text-base */
}

/* 계량기 위치 마커 */
.image-editor-center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.image-editor-simple-arrow {
    font-size: 4rem;
    /* text-6xl */
    color: #ef4444;
    /* red-500 */
    font-weight: 700;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(239, 68, 68, 0.5);
}

/* 푸터 */
.image-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    /* px-6 py-4 */
    border-top: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: rgb(30, 41, 59);
    /* panel-bg */
}

.image-editor-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
}

.image-editor-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    font-size: 0.875rem;
    /* text-sm */
    color: rgb(148, 163, 184);
    /* slate-400 */
}

.image-editor-info-item .material-symbols-outlined {
    font-size: 1.125rem;
    /* text-[18px] */
}

.image-editor-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* gap-3 */
}

.image-editor-button-secondary {
    height: 2.25rem;
    /* h-9 */
    padding: 0 1rem;
    /* px-4 */
    border-radius: 0.375rem;
    /* rounded-md */
    border: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: transparent;
    color: rgb(226, 232, 240);
    /* slate-200 */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
}

.image-editor-button-secondary:hover {
    background-color: rgb(51, 65, 85);
    /* slate-700 */
}

.image-editor-button-secondary .material-symbols-outlined {
    font-size: 1.125rem;
    /* text-[18px] */
}

.image-editor-button-primary {
    height: 2.25rem;
    /* h-9 */
    padding: 0 1.5rem;
    /* px-6 */
    border-radius: 0.375rem;
    /* rounded-md */
    background-color: #3b82f6;
    /* primary */
    border: none;
    color: white;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.image-editor-button-primary:hover {
    background-color: #2563eb;
    /* primary-600 */
}

.image-editor-button-primary:active {
    transform: scale(0.98);
}

.image-editor-button-primary .material-symbols-outlined {
    font-size: 1.125rem;
    /* text-[18px] */
}

/* Canvas 스타일 */
.image-editor-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(15, 23, 42);
    overflow: hidden;
    position: relative;
}

.image-editor-canvas-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* 툴 버튼 활성화 상태 */
.image-editor-tool-button.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.image-editor-tool-button.active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.image-editor-tool-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.image-editor-tool-button:disabled:hover {
    background-color: transparent;
}

/* 액션 버튼 (자르기 적용/취소) */
.image-editor-action-button {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 150ms;
    border: none;
}

.image-editor-action-button .material-symbols-outlined {
    font-size: 1.125rem;
}

.image-editor-action-button.crop-apply {
    background-color: #22c55e;
    color: white;
    margin-right: 0.5rem;
}

.image-editor-action-button.crop-apply:hover {
    background-color: #16a34a;
}

.image-editor-action-button.crop-cancel {
    background-color: rgb(51, 65, 85);
    color: rgb(226, 232, 240);
    border: 1px solid rgb(71, 85, 105);
}

.image-editor-action-button.crop-cancel:hover {
    background-color: rgb(71, 85, 105);
}

/* 모드 정보 표시 바 */
.image-editor-mode-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: rgba(30, 41, 59, 0.9);
    border-top: 1px solid rgb(51, 65, 85);
    font-size: 0.8125rem;
    color: rgb(203, 213, 225);
}

.image-editor-mode-info .material-symbols-outlined {
    font-size: 1.125rem;
}

/* 버튼 비활성화 상태 */
.image-editor-button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-editor-button-primary:disabled:hover {
    background-color: #3b82f6;
    transform: none;
}

.image-editor-button-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-editor-button-secondary:disabled:hover {
    background-color: transparent;
}
