/**
 * 이미지 모자이크 도구 스타일
 */

.mosaic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.mosaic-editor {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.mosaic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.mosaic-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.mosaic-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mosaic-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.mosaic-toolbar {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.mosaic-toolbar label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.mosaic-toolbar input[type="range"] {
    width: 120px;
}

.mosaic-toolbar button {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mosaic-toolbar button:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.btn-mosaic-clear {
    color: #dc3545;
}

.btn-mosaic-clear:hover {
    background: #fff5f5;
    border-color: #dc3545;
}

.btn-mosaic-undo {
    color: #007bff;
}

.btn-mosaic-undo:hover {
    background: #f0f7ff;
    border-color: #007bff;
}

#mosaic-pixel-value {
    font-weight: 600;
    color: #333;
    min-width: 25px;
    text-align: right;
}

.mosaic-canvas-container {
    flex: 1;
    overflow: auto;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
}

#mosaic-canvas {
    border: 2px solid #ddd;
    cursor: crosshair;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.mosaic-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.mosaic-footer button {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-mosaic-cancel {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-mosaic-cancel:hover {
    background: #e9ecef;
}

.btn-mosaic-apply {
    background: #007bff;
    color: white;
}

.btn-mosaic-apply:hover {
    background: #0056b3;
}

/* 반응형 */
@media (max-width: 768px) {
    .mosaic-editor {
        max-width: 95vw;
        max-height: 95vh;
    }

    .mosaic-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mosaic-toolbar label {
        width: 100%;
    }

    .mosaic-toolbar input[type="range"] {
        width: 100%;
    }

    .mosaic-footer {
        flex-direction: column;
    }

    .mosaic-footer button {
        width: 100%;
    }
}
