/**
 * PC2 이미지 편집기 스타일
 */

/* 이미지 편집기 버튼 스타일 */
.btn-type-01 {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-type-01:hover {
    background: #0056b3;
}

.btn-type-03 {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.btn-type-03:hover {
    background: #545b62;
}

/* 이미지 편집기 입력 필드 스타일 */
#image-editor-modal input[type="number"] {
    height: 40px;
    box-sizing: border-box;
}

/* 스핀 콘트롤 스타일 */
#image-editor-modal input[type="number"]::-webkit-inner-spin-button,
#image-editor-modal input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 36px;
    margin: 2px 0 2px 0; /* 오른쪽 여백 제거 */
}

#image-editor-modal input[type="number"]::-moz-inner-spin-button,
#image-editor-modal input[type="number"]::-moz-outer-spin-button {
    height: 36px;
    margin: 2px 0 2px 0; /* 오른쪽 여백 제거 */
}

/* 이미지 미리보기 컨테이너 */
.image-preview-container {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    position: relative;
    z-index: 10; /* 파일 입력 필드보다 위로 */
}

.image-preview-container .image-preview {
    max-width: 300px;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: default;
    display: block; /* 블록 요소로 변경 */
}

.image-preview-container button {
    cursor: pointer;
}

/* 파일첨부 영역 개선 */
.input_wrap.file_box {
    position: relative;
    display: inline-block;
    width: 100%;
}

.input_wrap.file_box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* 높이를 60px로 조정 */
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.btn_type_file {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
}

.btn_type_file:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 이미지 편집 모달 스타일 개선 */
#image-editor-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#image-editor-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#image-editor-modal h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

#image-editor-modal p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

#image-editor-modal .btn-group {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

#image-editor-modal .slider-container {
    margin-bottom: 15px;
}

#image-editor-modal .slider-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#image-editor-modal .slider-with-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

#image-editor-modal .slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    background: #ddd;
    -webkit-appearance: none;
    appearance: none;
}

#image-editor-modal .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#image-editor-modal .slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#image-editor-modal .slider-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: #007bff;
}

#image-editor-modal .filter-section {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#image-editor-modal .filter-section.scale-section {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
}

#image-editor-modal .filter-section.brightness-contrast-section {
    background: #f5f5f5;
    border: 1px solid #ddd;
}

#image-editor-modal .filter-help-text {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
    line-height: 1.3;
}

#image-editor-modal .action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

#image-editor-modal .action-buttons .btn-apply {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

#image-editor-modal .action-buttons .btn-apply:hover {
    background: #218838;
}

#image-editor-modal .action-buttons .btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#image-editor-modal .action-buttons .btn-cancel:hover {
    background: #545b62;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    #image-editor-modal .modal-content {
        margin: 20px;
        padding: 15px;
    }
    
    #image-editor-modal .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    #image-editor-modal .btn-group button {
        width: 100%;
        max-width: 200px;
    }
    
    #image-editor-modal .slider-with-value {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    #image-editor-modal .slider-value {
        text-align: center;
    }
    
    .image-preview-container .image-preview {
        max-width: 100%;
        height: auto;
    }
}
